x86/EFI: suppress GNU ld 2.36'es creation of base relocs
authorJan Beulich <jbeulich@suse.com>
Fri, 5 Mar 2021 14:35:19 +0000 (15:35 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 5 Mar 2021 14:35:19 +0000 (15:35 +0100)
commit97c0a5c05bb6ff87fd19b6366bb4a3ca006a32da
treec100ccbd6229c08d7f4cb538fda33a33c1dd4e2a
parent9b6054a63ebae032cd14dc610ed6d7c21e7e7a2f
x86/EFI: suppress GNU ld 2.36'es creation of base relocs

All of the sudden ld creates base relocations itself, for PE
executables - as a result we now have two of them for every entity to
be relocated. While we will likely want to use this down the road, it
doesn't work quite right yet in corner cases, so rather than suppressing
our own way of creating the relocations we need to tell ld to avoid
doing so.

Probe whether --disable-reloc-section (which was introduced by the same
commit making relocation generation the default) is recognized by ld's PE
emulation, and use the option if so. (To limit redundancy, move the first
part of setting EFI_LDFLAGS earlier, and use it already while probing.)

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 76cbb9c3f4dd9ab6aa44eeacab84fb88b2e8bfc1
master date: 2021-02-25 15:11:58 +0100
xen/arch/x86/Makefile