Skip to content

Commit

Permalink
x86: move ENTRY(), GLOBAL(), and ALIGN
Browse files Browse the repository at this point in the history
... to boot code, limiting their scope and thus allowing to drop
respective #undef-s from the linker script.

Signed-off-by: Jan Beulich <[email protected]>
Acked-by: Andrew Cooper <[email protected]>
  • Loading branch information
jbeulich committed Oct 2, 2024
1 parent eaa7a72 commit b102c9f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
9 changes: 9 additions & 0 deletions xen/arch/x86/boot/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@
#include <asm/cpufeature.h>
#include <public/elfnote.h>

#define ALIGN .align CONFIG_FUNCTION_ALIGNMENT, CODE_FILL
#define ENTRY(name) \
ALIGN; \
GLOBAL(name)
#define GLOBAL(name) \
.globl name; \
.hidden name; \
name:

.section .text.header, "ax", @progbits
.code32

Expand Down
8 changes: 0 additions & 8 deletions xen/arch/x86/include/asm/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,6 @@
/* Linkage for x86 */
#ifdef __ASSEMBLY__
#define CODE_FILL 0x90
#define ALIGN .align CONFIG_FUNCTION_ALIGNMENT, CODE_FILL
#define ENTRY(name) \
ALIGN; \
GLOBAL(name)
#define GLOBAL(name) \
.globl name; \
.hidden name; \
name:
#endif

#define NR_hypercalls 64
Expand Down
2 changes: 1 addition & 1 deletion xen/arch/x86/x86_64/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,7 @@ FUNC_LOCAL(autogen_stubs, 0) /* Automatically generated stubs. */
.if vec >= FIRST_IRQ_VECTOR
#endif

ALIGN
.align CONFIG_FUNCTION_ALIGNMENT, CODE_FILL
1:
ENDBR64
pushq $0
Expand Down
2 changes: 0 additions & 2 deletions xen/arch/x86/xen.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#include <xen/lib.h>
#include <xen/xen.lds.h>
#include <asm/page.h>
#undef ENTRY
#undef ALIGN

#ifdef EFI

Expand Down

0 comments on commit b102c9f

Please sign in to comment.