x86/build: make linking work again with ld incapable of generating build ID
authorJan Beulich <jbeulich@suse.com>
Fri, 22 Apr 2022 12:56:23 +0000 (14:56 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 22 Apr 2022 12:56:23 +0000 (14:56 +0200)
commit54279f87ecbcb3eab45fbdd52f44c1be998a9ab3
treed67a6dec4b56ca4ec0cc7dfbbf1f34495fc0341e
parentc8a25eb617ee8554d7212bb1c8e64227cb5566af
x86/build: make linking work again with ld incapable of generating build ID

The retaining of .note.* in a PT_NOTE segment requires a matching
program header to be present in the first place. Drop the respective
conditional and adjust mkelf32 to deal with (ignore) the potentially
present but empty extra segment (but have the new code be generic by
dropping any excess trailing entirely empty segments).

Fixes: dedb0aa42c6d ("x86/build: use --orphan-handling linker option if available")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/boot/mkelf32.c
xen/arch/x86/xen.lds.S