dileks@iniza:~/src/linux/git$ git grep -n -e 'kallsyms[0-9]' -e 'vmlinux[0-9]' scripts/ scripts/link-vmlinux.sh:210: true > .tmp_vmlinux.kallsyms0.syms scripts/link-vmlinux.sh:211: kallsyms .tmp_vmlinux.kallsyms0.syms .tmp_vmlinux0.kallsyms scripts/link-vmlinux.sh:221: vmlinux_link .tmp_vmlinux1 scripts/link-vmlinux.sh:225: if ! gen_btf .tmp_vmlinux1; then scripts/link-vmlinux.sh:238: # 1) Link .tmp_vmlinux.kallsyms1 so it has all symbols and sections, scripts/link-vmlinux.sh:240: # Running kallsyms on that gives us .tmp_kallsyms1.o with scripts/link-vmlinux.sh:242: # 2) Link .tmp_vmlinux.kallsyms2 so it now has a __kallsyms section of scripts/link-vmlinux.sh:245: # From here, we generate a correct .tmp_vmlinux.kallsyms2.o scripts/link-vmlinux.sh:261: sysmap_and_kallsyms .tmp_vmlinux1 scripts/link-vmlinux.sh:264: vmlinux_link .tmp_vmlinux2 scripts/link-vmlinux.sh:265: sysmap_and_kallsyms .tmp_vmlinux2 scripts/link-vmlinux.sh:269: vmlinux_link .tmp_vmlinux3 scripts/link-vmlinux.sh:270: sysmap_and_kallsyms .tmp_vmlinux dileks@iniza:~/src/linux/git$ LC_ALL=C ls -alth .*vmlinux* *vmlinux* -rw-rw-r-- 1 dileks dileks 915 Nov 22 20:52 .vmlinux.cmd -rwxrwxr-x 1 dileks dileks 283M Nov 22 20:52 vmlinux -rw-rw-r-- 1 dileks dileks 3.1M Nov 22 20:52 .tmp_vmlinux2.kallsyms.o -rw-rw-r-- 1 dileks dileks 34M Nov 22 20:52 .tmp_vmlinux2.kallsyms.S -rw-rw-r-- 1 dileks dileks 6.5M Nov 22 20:52 .tmp_vmlinux2.syms -rwxrwxr-x 1 dileks dileks 101M Nov 22 20:52 .tmp_vmlinux2 -rw-rw-r-- 1 dileks dileks 3.1M Nov 22 20:52 .tmp_vmlinux1.kallsyms.o -rw-rw-r-- 1 dileks dileks 34M Nov 22 20:52 .tmp_vmlinux1.kallsyms.S -rw-rw-r-- 1 dileks dileks 6.5M Nov 22 20:52 .tmp_vmlinux1.syms -rwxrwxr-x 1 dileks dileks 52M Nov 22 20:52 .tmp_vmlinux1.btf.o -rwxrwxr-x 1 dileks dileks 514M Nov 22 20:52 .tmp_vmlinux1 -rw-rw-r-- 1 dileks dileks 2.1K Nov 22 20:51 .tmp_vmlinux0.kallsyms.o -rw-rw-r-- 1 dileks dileks 6.3K Nov 22 20:51 .tmp_vmlinux0.kallsyms.S -rw-rw-r-- 1 dileks dileks 0 Nov 22 20:51 .tmp_vmlinux.kallsyms0.syms -rw-rw-r-- 1 dileks dileks 5.3K Nov 22 20:51 ..vmlinux.export.o.cmd -rw-rw-r-- 1 dileks dileks 6.6M Nov 22 20:51 .vmlinux.export.o -rw-rw-r-- 1 dileks dileks 1.1M Nov 22 20:51 .vmlinux.export.c -rw-rw-r-- 1 dileks dileks 139 Nov 22 20:47 ..vmlinux.objs.cmd -rw-rw-r-- 1 dileks dileks 61K Nov 22 20:47 .vmlinux.objs -rw-rw-r-- 1 dileks dileks 391 Nov 22 20:47 .vmlinux.o.cmd -rw-rw-r-- 1 dileks dileks 511M Nov 22 20:47 vmlinux.o -rw-rw-r-- 1 dileks dileks 292 Nov 22 20:47 .vmlinux.a.cmd -rw-rw-r-- 1 dileks dileks 2.6M Nov 22 20:47 vmlinux.a $ grep 'kallsyms .tmp' ~/src/linux/archives/6.12.1-1-amd64-clang19-kcfi/build-log_6.12.1-1-amd64-clang19-kcfi.txt 94662:+ kallsyms .tmp_vmlinux.kallsyms0.syms .tmp_vmlinux0.kallsyms 94734:+ sysmap_and_kallsyms .tmp_vmlinux1 94741:+ kallsyms .tmp_vmlinux1.syms .tmp_vmlinux1.kallsyms 94795:+ sysmap_and_kallsyms .tmp_vmlinux2 94802:+ kallsyms .tmp_vmlinux2.syms .tmp_vmlinux2.kallsyms Something like that would make more sense: diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index 53bd4b727e21..9e59849f457a 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -207,8 +207,8 @@ kallsymso= strip_debug= if is_enabled CONFIG_KALLSYMS; then - true > .tmp_vmlinux.kallsyms0.syms - kallsyms .tmp_vmlinux.kallsyms0.syms .tmp_vmlinux0.kallsyms + true > .tmp_vmlinux0.kallsyms.syms + kallsyms .tmp_vmlinux0.kallsyms.syms .tmp_vmlinux0.kallsyms fi if is_enabled CONFIG_KALLSYMS || is_enabled CONFIG_DEBUG_INFO_BTF; then @@ -235,14 +235,14 @@ if is_enabled CONFIG_KALLSYMS; then # Generate section listing all symbols and add it into vmlinux # It's a four step process: # 0) Generate a dummy __kallsyms with empty symbol list. - # 1) Link .tmp_vmlinux.kallsyms1 so it has all symbols and sections, + # 1) Link .tmp_vmlinux1.kallsyms so it has all symbols and sections, # with a dummy __kallsyms. - # Running kallsyms on that gives us .tmp_kallsyms1.o with + # Running kallsyms on that gives us .tmp_vmlinux1.kallsyms.o with # the right size - # 2) Link .tmp_vmlinux.kallsyms2 so it now has a __kallsyms section of + # 2) Link .tmp_vmlinux2.kallsyms so it now has a __kallsyms section of # the right size, but due to the added section, some # addresses have shifted. - # From here, we generate a correct .tmp_vmlinux.kallsyms2.o + # From here, we generate a correct .tmp_vmlinux2.kallsyms.o # 3) That link may have expanded the kernel image enough that # more linker branch stubs / trampolines had to be added, which # introduces new names, which further expands kallsyms. Do another Added as a diff file - when GMail truncates above. BR, -Sedat- P.S.: After diff run... $ git grep -n -e 'kallsyms[0-9]' -e 'vmlinux[0-9]' scripts/ scripts/link-vmlinux.sh:210: true > .tmp_vmlinux0.kallsyms.syms scripts/link-vmlinux.sh:211: kallsyms .tmp_vmlinux0.kallsyms.syms .tmp_vmlinux0.kallsyms scripts/link-vmlinux.sh:221: vmlinux_link .tmp_vmlinux1 scripts/link-vmlinux.sh:225: if ! gen_btf .tmp_vmlinux1; then scripts/link-vmlinux.sh:238: # 1) Link .tmp_vmlinux1.kallsyms so it has all symbols and sections, scripts/link-vmlinux.sh:240: # Running kallsyms on that gives us .tmp_vmlinux1.kallsyms.o with scripts/link-vmlinux.sh:242: # 2) Link .tmp_vmlinux2.kallsyms so it now has a __kallsyms section of scripts/link-vmlinux.sh:245: # From here, we generate a correct .tmp_vmlinux2.kallsyms.o scripts/link-vmlinux.sh:261: sysmap_and_kallsyms .tmp_vmlinux1 scripts/link-vmlinux.sh:264: vmlinux_link .tmp_vmlinux2 scripts/link-vmlinux.sh:265: sysmap_and_kallsyms .tmp_vmlinux2 scripts/link-vmlinux.sh:269: vmlinux_link .tmp_vmlinux3 scripts/link-vmlinux.sh:270: sysmap_and_kallsyms .tmp_vmlinux3
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index 53bd4b727e21..9e59849f457a 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -207,8 +207,8 @@ kallsymso= strip_debug= if is_enabled CONFIG_KALLSYMS; then - true > .tmp_vmlinux.kallsyms0.syms - kallsyms .tmp_vmlinux.kallsyms0.syms .tmp_vmlinux0.kallsyms + true > .tmp_vmlinux0.kallsyms.syms + kallsyms .tmp_vmlinux0.kallsyms.syms .tmp_vmlinux0.kallsyms fi if is_enabled CONFIG_KALLSYMS || is_enabled CONFIG_DEBUG_INFO_BTF; then @@ -235,14 +235,14 @@ if is_enabled CONFIG_KALLSYMS; then # Generate section listing all symbols and add it into vmlinux # It's a four step process: # 0) Generate a dummy __kallsyms with empty symbol list. - # 1) Link .tmp_vmlinux.kallsyms1 so it has all symbols and sections, + # 1) Link .tmp_vmlinux1.kallsyms so it has all symbols and sections, # with a dummy __kallsyms. - # Running kallsyms on that gives us .tmp_kallsyms1.o with + # Running kallsyms on that gives us .tmp_vmlinux1.kallsyms.o with # the right size - # 2) Link .tmp_vmlinux.kallsyms2 so it now has a __kallsyms section of + # 2) Link .tmp_vmlinux2.kallsyms so it now has a __kallsyms section of # the right size, but due to the added section, some # addresses have shifted. - # From here, we generate a correct .tmp_vmlinux.kallsyms2.o + # From here, we generate a correct .tmp_vmlinux2.kallsyms.o # 3) That link may have expanded the kernel image enough that # more linker branch stubs / trampolines had to be added, which # introduces new names, which further expands kallsyms. Do another