x86/EFI: sections may not live at VA 0 in PE binaries
authorJan Beulich <jbeulich@suse.com>
Mon, 26 Apr 2021 08:24:20 +0000 (10:24 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 26 Apr 2021 08:24:20 +0000 (10:24 +0200)
commit940f22732ad1f018c87c8decf88b0efeaa3a2b0e
tree066181434c18171cbbb7010d14905538b651b1ca
parent95419adfd4b275cffe24b96edcc2f15bc4db8907
x86/EFI: sections may not live at VA 0 in PE binaries

PE binaries specify section addresses by (32-bit) RVA. GNU ld up to at
least 2.36 would silently truncate the (negative) difference when a
section is placed below the image base. Such sections would also be
wrongly placed ahead of all "normal" ones. Since, for the time being,
we build xen.efi with --strip-debug anyway, .stab* can't appear. And
.comment has an entry in /DISCARD/ already anyway in the EFI case.

Because of their unclear origin, keep the directives for the ELF case
though.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/xen.lds.S