diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S index e0901ee40044..6a06f6c9ea46 100644 --- a/xen/arch/x86/boot/head.S +++ b/xen/arch/x86/boot/head.S @@ -10,6 +10,15 @@ #include #include +#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 diff --git a/xen/arch/x86/include/asm/config.h b/xen/arch/x86/include/asm/config.h index 1f828bfd52f4..f8a5a4913b07 100644 --- a/xen/arch/x86/include/asm/config.h +++ b/xen/arch/x86/include/asm/config.h @@ -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 diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S index 3e720a358bc7..c5c723b5f4d4 100644 --- a/xen/arch/x86/x86_64/entry.S +++ b/xen/arch/x86/x86_64/entry.S @@ -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 diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S index b60d2f0d82c8..94079fc1640d 100644 --- a/xen/arch/x86/xen.lds.S +++ b/xen/arch/x86/xen.lds.S @@ -5,8 +5,6 @@ #include #include #include -#undef ENTRY -#undef ALIGN #ifdef EFI