kbuild: remove PROVIDE() for kallsyms symbols
This reimplements commit 951bcae6 ("kallsyms: Avoid weak references for kallsyms symbols") because I am not a big fan of PROVIDE(). As an alternative solution, this commit prepends one more kallsyms step. KSYMS .tmp_vmlinux.kallsyms0.S # added AS .tmp_vmlinux.kallsyms0.o # added LD .tmp_vmlinux.btf BTF .btf.vmlinux.bin.o LD .tmp_vmlinux.kallsyms1 NM .tmp_vmlinux.kallsyms1.syms KSYMS .tmp_vmlinux.kallsyms1.S AS .tmp_vmlinux.kallsyms1.o LD .tmp_vmlinux.kallsyms2 NM .tmp_vmlinux.kallsyms2.syms KSYMS .tmp_vmlinux.kallsyms2.S AS .tmp_vmlinux.kallsyms2.o LD vmlinux Step 0 takes /dev/null as input, and generates .tmp_vmlinux.kallsyms0.o, which has a valid kallsyms format with the empty symbol list, and can be linked to vmlinux. Since it is really small, the added compile-time cost is negligible. Signed-off-by: Masahiro Yamada <masahiroy...
Showing
- include/asm-generic/vmlinux.lds.h 0 additions, 19 deletionsinclude/asm-generic/vmlinux.lds.h
- kernel/kallsyms_internal.h 0 additions, 5 deletionskernel/kallsyms_internal.h
- scripts/kallsyms.c 0 additions, 6 deletionsscripts/kallsyms.c
- scripts/link-vmlinux.sh 7 additions, 2 deletionsscripts/link-vmlinux.sh
Please register or sign in to comment