]> xenbits.xensource.com Git - xen.git/commitdiff
x86: move ENTRY(), GLOBAL(), and ALIGN
authorJan Beulich <jbeulich@suse.com>
Wed, 2 Oct 2024 06:59:03 +0000 (08:59 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 2 Oct 2024 06:59:03 +0000 (08:59 +0200)
... to boot code, limiting their scope and thus allowing to drop
respective #undef-s from the linker script.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/boot/head.S
xen/arch/x86/include/asm/config.h
xen/arch/x86/x86_64/entry.S
xen/arch/x86/xen.lds.S

index e0901ee40044bc7024762381ff498d8ae9968c38..6a06f6c9ea46c999e059198ae41aae1a5adbfe7b 100644 (file)
 #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
 
index 1f828bfd52f4ca0558c49ab916e05e834d8c652f..f8a5a4913b07db970f9c163b6bccc6e69d2be311 100644 (file)
 /* 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
index 3e720a358bc70ad00eef3353caa1af0ca5f6df53..c5c723b5f4d4d5b1e8f679fbddffef42aadb802f 100644 (file)
@@ -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
index b60d2f0d82c8501464f7db2b42ef774b956aaeeb..94079fc1640d4e2b53ef56ed57926c9af89f87a2 100644 (file)
@@ -5,8 +5,6 @@
 #include <xen/lib.h>
 #include <xen/xen.lds.h>
 #include <asm/page.h>
-#undef ENTRY
-#undef ALIGN
 
 #ifdef EFI