... to boot code, limiting their scope and thus allowing to drop respective #undef-s from the linker script.
Signed-off-by: Jan Beulich <jbeul...@suse.com> --- An obvious alternative would be to convert boot code right away too, but I think this has lower priority for now. --- v6: New. --- a/xen/arch/x86/boot/head.S +++ b/xen/arch/x86/boot/head.S @@ -10,6 +10,15 @@ #include <asm/cpufeature.h> #include <public/elfnote.h> +#define ALIGN .align CODE_ALIGN, CODE_FILL +#define ENTRY(name) \ + ALIGN; \ + GLOBAL(name) +#define GLOBAL(name) \ + .globl name; \ + .hidden name; \ + name: + .section .text.header, "ax", @progbits .code32 --- a/xen/arch/x86/include/asm/config.h +++ b/xen/arch/x86/include/asm/config.h @@ -45,14 +45,6 @@ #ifdef __ASSEMBLY__ #define CODE_ALIGN 16 #define CODE_FILL 0x90 -#define ALIGN .align CODE_ALIGN, CODE_FILL -#define ENTRY(name) \ - ALIGN; \ - GLOBAL(name) -#define GLOBAL(name) \ - .globl name; \ - .hidden name; \ - name: #endif #define NR_hypercalls 64 --- a/xen/arch/x86/x86_64/entry.S +++ b/xen/arch/x86/x86_64/entry.S @@ -1199,7 +1199,7 @@ FUNC_LOCAL(autogen_stubs, 0) /* Automati .if vec >= FIRST_IRQ_VECTOR #endif - ALIGN + .align CODE_ALIGN, CODE_FILL 1: ENDBR64 pushq $0 --- a/xen/arch/x86/xen.lds.S +++ b/xen/arch/x86/xen.lds.S @@ -5,8 +5,6 @@ #include <xen/lib.h> #include <xen/xen.lds.h> #include <asm/page.h> -#undef ENTRY -#undef ALIGN #ifdef EFI