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>
#include <xen/lib.h>
+
+#define DECL_SECTION_WITH_LADDR
#include <xen/xen.lds.h>
OUTPUT_ARCH(powerpc:common64)
#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>
#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)
* 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,