]> xenbits.xensource.com Git - people/aperard/xen-unstable.git/commitdiff
xen: introduce DECL_SECTION_WITH_LADDR
authorOleksii Kurochko <oleksii.kurochko@gmail.com>
Tue, 15 Oct 2024 12:19:07 +0000 (14:19 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 15 Oct 2024 12:19:07 +0000 (14:19 +0200)
Introduce DECL_SECTION_WITH_LADDR in order to signal whether
DECL_SECTION() should specify a load address or not.

Update {ppc,x86}/xen.lds.S to use DECL_SECTION_WITH_LADDR.

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/ppc/xen.lds.S
xen/arch/x86/xen.lds.S
xen/include/xen/xen.lds.h

index 0c4b94814b48860f3b2ea4a1d87b5b1d94df66b8..30b4a6ced85666410c6e51ac705508c2fcc96a2a 100644 (file)
@@ -1,4 +1,6 @@
 #include <xen/lib.h>
+
+#define DECL_SECTION_WITH_LADDR
 #include <xen/xen.lds.h>
 
 OUTPUT_ARCH(powerpc:common64)
index 94079fc1640d4e2b53ef56ed57926c9af89f87a2..35693f6e3380820e31706cef80a36f3cca454212 100644 (file)
@@ -3,6 +3,10 @@
 
 #include <xen/cache.h>
 #include <xen/lib.h>
+
+#ifndef EFI
+# define DECL_SECTION_WITH_LADDR
+#endif
 #include <xen/xen.lds.h>
 #include <asm/page.h>
 
@@ -10,9 +14,7 @@
 
 #define FORMAT "pei-x86-64"
 #undef __XEN_VIRT_START
-#undef DECL_SECTION
 #define __XEN_VIRT_START __image_base__
-#define DECL_SECTION(x) x :
 
 ENTRY(efi_start)
 
index 24b8900ffe20ea3cf0647cbc1f91a0266d107572..c6178bdc423294d50b93adf1654fb26df7156f06 100644 (file)
@@ -5,6 +5,8 @@
  * Common macros to be used in architecture specific linker scripts.
  */
 
+#ifdef DECL_SECTION_WITH_LADDR
+
 /*
  * Declare a section whose load address is based at PA 0 rather than
  * Xen's virtual base address.
 # define DECL_SECTION(x) x : AT(ADDR(x) - __XEN_VIRT_START)
 #endif
 
+#else /* !DECL_SECTION_WITH_LADDR */
+#define DECL_SECTION(x) x :
+#endif
+
 /*
  * To avoid any confusion, please note that the EFI macro does not correspond
  * to EFI support and is used when linking a native EFI (i.e. PE/COFF) binary,