xen: introduce DECL_SECTION_WITH_LADDR

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>
This commit is contained in:
Oleksii Kurochko authored and Jan Beulich committed 2024-10-15 14:19:07 +02:00
1 parent 542ac112fc
commit 17d32cf2ec
3 files changed
+12 -2

No files matched your search

+2
View File
@@ -1,4 +1,6 @@
#include <xen/lib.h>
#define DECL_SECTION_WITH_LADDR
#include <xen/xen.lds.h>
OUTPUT_ARCH(powerpc:common64)
+4 -2
View 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)
+6
View 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.
@@ -15,6 +17,10 @@
# 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,
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.