[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v3 1/3] x86/linker: add a reloc section to ELF linker script
if the hypervisor has been built with EFI support (ie: multiboot2). This allows to position the .reloc section correctly in the output binary. Note that for the ELF output format the .reloc section is moved before .bss because the data it contains is read-only, so it belongs with the other sections containing read-only data. Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- Cc: Jan Beulich <jbeulich@xxxxxxxx> Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Cc: Wei Liu <wl@xxxxxxx> --- Changes since v2: - Fix subject to mention the section is added to the linker script. - Fix commit message to note .reloc is added together with the rest of the read-only sections. Changes since v1: - Move the .reloc section position in the output binary only for the ELF output format. --- xen/arch/x86/xen.lds.S | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S index 98a99444c2..19aa4332cf 100644 --- a/xen/arch/x86/xen.lds.S +++ b/xen/arch/x86/xen.lds.S @@ -175,6 +175,14 @@ SECTIONS } :text #endif #endif + +#if defined(XEN_BUILD_EFI) && !defined(EFI) + . = ALIGN(4); + DECL_SECTION(.reloc) { + *(.reloc) + } :text +#endif + _erodata = .; . = ALIGN(SECTION_ALIGN); -- 2.20.1 (Apple Git-117) _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |