path: root/scripts/
diff options
authorLinus Torvalds <>2020-10-22 13:13:57 -0700
committerLinus Torvalds <>2020-10-22 13:13:57 -0700
commit746b25b1aa0f5736d585728ded70a8141da91edb (patch)
tree52150ab7247f11fbb43b41dfb5da46411a30a8e2 /scripts/
parent2b71482060e1e6962720dbca1dff702580fa0748 (diff)
parent1e66d50ad3a1dbf0169b14d502be59a4b1213149 (diff)
Merge tag 'kbuild-v5.10' of git://
Pull Kbuild updates from Masahiro Yamada: - Support 'make compile_commands.json' to generate the compilation database more easily, avoiding stale entries - Support 'make clang-analyzer' and 'make clang-tidy' for static checks using clang-tidy - Preprocess scripts/ to allow CONFIG options in the module linker script - Drop cc-option tests from compiler flags supported by our minimal GCC/Clang versions - Use always 12-digits commit hash for CONFIG_LOCALVERSION_AUTO=y - Use sha1 build id for both BFD linker and LLD - Improve deb-pkg for reproducible builds and rootless builds - Remove stale, useless scripts/ - Turn -Wreturn-type warning into error - Fix build error of deb-pkg when CONFIG_MODULES=n - Replace 'hostname' command with more portable 'uname -n' - Various Makefile cleanups * tag 'kbuild-v5.10' of git:// (34 commits) kbuild: Use uname for LINUX_COMPILE_HOST detection kbuild: Only add -fno-var-tracking-assignments for old GCC versions kbuild: remove leftover comment for filechk utility treewide: remove DISABLE_LTO kbuild: deb-pkg: clean up package name variables kbuild: deb-pkg: do not build linux-headers package if CONFIG_MODULES=n kbuild: enforce -Werror=return-type scripts: remove builddeb: Add support for all required debian/rules targets builddeb: Enable rootless builds builddeb: Pass -n to gzip for reproducible packages kbuild: split the build log of kallsyms kbuild: explicitly specify the build id style scripts/setlocalversion: make git describe output more reliable kbuild: remove cc-option test of -Werror=date-time kbuild: remove cc-option test of -fno-stack-check kbuild: remove cc-option test of -fno-strict-overflow kbuild: move CFLAGS_{KASAN,UBSAN,KCSAN} exports to relevant Makefiles kbuild: remove redundant CONFIG_KASAN check from scripts/Makefile.kasan kbuild: do not create built-in objects for external module builds ...
Diffstat (limited to 'scripts/')
1 files changed, 10 insertions, 10 deletions
diff --git a/scripts/ b/scripts/
index dbde59d343b1..6eded325c837 100755
--- a/scripts/
+++ b/scripts/
@@ -169,10 +169,9 @@ gen_btf()
printf '\1' | dd of=${2} conv=notrunc bs=1 seek=16 status=none
-# Create ${2} .o file with all symbols from the ${1} object file
+# Create ${2} .S file with all symbols from the ${1} object file
- info KSYM ${2}
local kallsymopt;
if [ -n "${CONFIG_KALLSYMS_ALL}" ]; then
@@ -187,13 +186,8 @@ kallsyms()
kallsymopt="${kallsymopt} --base-relative"
- local afile="`basename ${2} .o`.S"
- ${NM} -n ${1} | scripts/kallsyms ${kallsymopt} > ${afile}
- ${CC} ${aflags} -c -o ${2} ${afile}
+ info KSYMS ${2}
+ ${NM} -n ${1} | scripts/kallsyms ${kallsymopt} > ${2}
# Perform one step in kallsyms generation, including temporary linking of
@@ -203,9 +197,15 @@ kallsyms_step()
+ kallsyms_S=${kallsyms_vmlinux}.S
vmlinux_link ${kallsyms_vmlinux} "${kallsymso_prev}" ${btf_vmlinux_bin_o}
- kallsyms ${kallsyms_vmlinux} ${kallsymso}
+ kallsyms ${kallsyms_vmlinux} ${kallsyms_S}
+ info AS ${kallsyms_S}
+ -c -o ${kallsymso} ${kallsyms_S}
# Create map file with all symbols from ${1}