mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
2616037135
The VDSO symbols can't be linked into built-in.o when building with thin archives, so change this to linking a new object file that is included into the built-in.o. Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: linux-ia64@vger.kernel.org Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
29 lines
927 B
Makefile
29 lines
927 B
Makefile
# The gate DSO image is built using a special linker script.
|
|
|
|
targets += gate.so gate.lds gate.o gate-dummy.o
|
|
|
|
obj-y += gate-syms.o
|
|
|
|
CPPFLAGS_gate.lds := -P -C -U$(ARCH)
|
|
|
|
quiet_cmd_gate = GATE $@
|
|
cmd_gate = $(CC) -nostdlib $(GATECFLAGS_$(@F)) -Wl,-T,$(filter-out FORCE,$^) -o $@
|
|
|
|
GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1 \
|
|
$(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
|
|
$(obj)/gate.so: $(obj)/gate.lds $(obj)/gate.o FORCE
|
|
$(call if_changed,gate)
|
|
|
|
GATECFLAGS_gate-dummy.o = -r
|
|
$(obj)/gate-dummy.o: $(obj)/gate.lds $(obj)/gate.o FORCE
|
|
$(call if_changed,gate)
|
|
|
|
LDFLAGS_gate-syms.o := -r -R
|
|
$(obj)/gate-syms.o: $(obj)/gate-dummy.o FORCE
|
|
$(call if_changed,ld)
|
|
|
|
# gate-data.o contains the gate DSO image as data in section .data..gate.
|
|
# We must build gate.so before we can assemble it.
|
|
# Note: kbuild does not track this dependency due to usage of .incbin
|
|
$(obj)/gate-data.o: $(obj)/gate.so
|