mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
build/non-x86: fix symbol lookup in presence of build-id
It's not clear why only x86 had $(build_id_linker) applied to all three linking passes. Not doing so will alter symbol offsets between the 2nd and 3rd passes for, potentially, all of the symbols at higher addresses (intermediate alignment padding may mask this effect, though, so it will look as if problems appeared randomly). Fixes:a353cab905("build_id: Provide ld-embedded build-ids") Reported-by: Mykola Kvach <xakep.amatop@gmail.com> Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> Tested-by: Mykola Kvach <xakep.amatop@gmail.com> # arm Reviewed-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> # riscv Tested-by: Jason Andryuk <jason.andryuk@amd.com> # arm64 Acked-by: Michal Orzel <michal.orzel@amd.com> [jb: backport limited to Arm] master commit:f0abe60de1master date: 2026-01-27 10:26:36 +0100
This commit is contained in:
1 parent
fad76f0d20
commit
6b4480fe71
1 file changed
+2
-2
@@ -97,13 +97,13 @@ ifeq ($(CONFIG_ARM_64),y)
|
||||
endif
|
||||
|
||||
$(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds
|
||||
$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< \
|
||||
$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
|
||||
$(objtree)/common/symbols-dummy.o -o $(dot-target).0
|
||||
$(NM) -pa --format=sysv $(dot-target).0 \
|
||||
| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
|
||||
> $(dot-target).0.S
|
||||
$(MAKE) $(build)=$(@D) $(dot-target).0.o
|
||||
$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< \
|
||||
$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
|
||||
$(dot-target).0.o -o $(dot-target).1
|
||||
$(NM) -pa --format=sysv $(dot-target).1 \
|
||||
| $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
|
||||
|
||||