mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 04:34:08 +08:00
kbuild: stop merging *.symversions
Now modpost reads symbol versions from .*.cmd files. The merged *.symversions are no longer needed. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu> Tested-by: Nathan Chancellor <nathan@kernel.org> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
This commit is contained in:
parent
7b4537199a
commit
7375cbcf23
@ -390,17 +390,6 @@ $(obj)/%.asn1.c $(obj)/%.asn1.h: $(src)/%.asn1 $(objtree)/scripts/asn1_compiler
|
||||
$(subdir-builtin): $(obj)/%/built-in.a: $(obj)/% ;
|
||||
$(subdir-modorder): $(obj)/%/modules.order: $(obj)/% ;
|
||||
|
||||
# combine symversions for later processing
|
||||
ifeq ($(CONFIG_LTO_CLANG) $(CONFIG_MODVERSIONS),y y)
|
||||
cmd_update_lto_symversions = \
|
||||
rm -f $@.symversions \
|
||||
$(foreach n, $(filter-out FORCE,$^), \
|
||||
$(if $(shell test -s $(n).symversions && echo y), \
|
||||
; cat $(n).symversions >> $@.symversions))
|
||||
else
|
||||
cmd_update_lto_symversions = echo >/dev/null
|
||||
endif
|
||||
|
||||
#
|
||||
# Rule to compile a set of .o files into one .a file (without symbol table)
|
||||
#
|
||||
@ -408,11 +397,8 @@ endif
|
||||
quiet_cmd_ar_builtin = AR $@
|
||||
cmd_ar_builtin = rm -f $@; $(AR) cDPrST $@ $(real-prereqs)
|
||||
|
||||
quiet_cmd_ar_and_symver = AR $@
|
||||
cmd_ar_and_symver = $(cmd_update_lto_symversions); $(cmd_ar_builtin)
|
||||
|
||||
$(obj)/built-in.a: $(real-obj-y) FORCE
|
||||
$(call if_changed,ar_and_symver)
|
||||
$(call if_changed,ar_builtin)
|
||||
|
||||
#
|
||||
# Rule to create modules.order file
|
||||
@ -432,16 +418,13 @@ $(obj)/modules.order: $(obj-m) FORCE
|
||||
#
|
||||
# Rule to compile a set of .o files into one .a file (with symbol table)
|
||||
#
|
||||
quiet_cmd_ar_lib = AR $@
|
||||
cmd_ar_lib = $(cmd_update_lto_symversions); $(cmd_ar)
|
||||
|
||||
$(obj)/lib.a: $(lib-y) FORCE
|
||||
$(call if_changed,ar_lib)
|
||||
$(call if_changed,ar)
|
||||
|
||||
ifneq ($(CONFIG_LTO_CLANG)$(CONFIG_X86_KERNEL_IBT),)
|
||||
quiet_cmd_link_multi-m = AR [M] $@
|
||||
cmd_link_multi-m = \
|
||||
$(cmd_update_lto_symversions); \
|
||||
rm -f $@; \
|
||||
$(AR) cDPrsT $@ @$(patsubst %.o,%.mod,$@)
|
||||
else
|
||||
|
@ -56,20 +56,6 @@ gen_initcalls()
|
||||
> .tmp_initcalls.lds
|
||||
}
|
||||
|
||||
# If CONFIG_LTO_CLANG is selected, collect generated symbol versions into
|
||||
# .tmp_symversions.lds
|
||||
gen_symversions()
|
||||
{
|
||||
info GEN .tmp_symversions.lds
|
||||
rm -f .tmp_symversions.lds
|
||||
|
||||
for o in ${KBUILD_VMLINUX_OBJS} ${KBUILD_VMLINUX_LIBS}; do
|
||||
if [ -f ${o}.symversions ]; then
|
||||
cat ${o}.symversions >> .tmp_symversions.lds
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Link of vmlinux.o used for section mismatch analysis
|
||||
# ${1} output file
|
||||
modpost_link()
|
||||
@ -88,10 +74,6 @@ modpost_link()
|
||||
gen_initcalls
|
||||
lds="-T .tmp_initcalls.lds"
|
||||
|
||||
if is_enabled CONFIG_MODVERSIONS; then
|
||||
gen_symversions
|
||||
fi
|
||||
|
||||
# This might take a while, so indicate that we're doing
|
||||
# an LTO link
|
||||
info LTO ${1}
|
||||
@ -307,7 +289,6 @@ cleanup()
|
||||
rm -f .btf.*
|
||||
rm -f .tmp_System.map
|
||||
rm -f .tmp_initcalls.lds
|
||||
rm -f .tmp_symversions.lds
|
||||
rm -f .tmp_vmlinux*
|
||||
rm -f System.map
|
||||
rm -f vmlinux
|
||||
|
Loading…
Reference in New Issue
Block a user