[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v2 07/11] x86/efi: discard multiboot related entry code for PE binary
The multiboot and PVH entry points are not used in the PE binary, hence discard them in the linker script when doing a PE build. That removes some relocations that otherwise appear due to the entry point code in head.S not being position independent. No functional change intended. Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- We could also place the entry points in it's own isolated section and skip such section for relocations generation in mkreloc, but it seems best to just remove the code if it's unused. --- xen/arch/x86/boot/head.S | 3 ++- xen/arch/x86/xen.lds.S | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S index 81473578fe84..774894954e44 100644 --- a/xen/arch/x86/boot/head.S +++ b/xen/arch/x86/boot/head.S @@ -151,7 +151,7 @@ vga_text_buffer: efi_platform: .byte 0 - .section .init.text, "ax", @progbits + .section .init.multiboot, "ax", @progbits early_error: /* Here to improve the disassembly. */ @@ -709,6 +709,7 @@ trampoline_setup: /* Jump into the relocated trampoline. */ lret + .section .init.text, "ax", @progbits ENTRY(trampoline_start) #include "trampoline.S" ENTRY(trampoline_end) diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S index ad908539f38a..1191bf4e2ddd 100644 --- a/xen/arch/x86/xen.lds.S +++ b/xen/arch/x86/xen.lds.S @@ -63,6 +63,7 @@ SECTIONS . = __image_base__; /DISCARD/ : { *(.text.header) + *(.init.multiboot) } #endif @@ -208,6 +209,7 @@ SECTIONS _sinittext = .; *(.init.text) *(.text.startup) + *(.init.multiboot) _einittext = .; /* * Here are the replacement instructions. The linker sticks them -- 2.48.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |