File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,22 +104,6 @@ static bool is_ignored_symbol(const char *name, char type)
104104{
105105 /* Symbol names that exactly match to the following are ignored.*/
106106 static const char * const ignored_symbols [] = {
107- /*
108- * Symbols which vary between passes. Passes 1 and 2 must have
109- * identical symbol lists. The kallsyms_* symbols below are
110- * only added after pass 1, they would be included in pass 2
111- * when --all-symbols is specified so exclude them to get a
112- * stable symbol list.
113- */
114- "kallsyms_addresses" ,
115- "kallsyms_offsets" ,
116- "kallsyms_relative_base" ,
117- "kallsyms_num_syms" ,
118- "kallsyms_names" ,
119- "kallsyms_markers" ,
120- "kallsyms_token_table" ,
121- "kallsyms_token_index" ,
122- "kallsyms_seqs_of_names" ,
123107 /* Exclude linker generated symbols which vary between passes */
124108 "_SDA_BASE_" , /* ppc */
125109 "_SDA2_BASE_" , /* ppc */
Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ kallsyms_step()
174174 kallsyms_S=${kallsyms_vmlinux} .S
175175
176176 vmlinux_link ${kallsyms_vmlinux} " ${kallsymso_prev} " ${btf_vmlinux_bin_o}
177- mksysmap ${kallsyms_vmlinux} ${kallsyms_vmlinux} .syms
177+ mksysmap ${kallsyms_vmlinux} ${kallsyms_vmlinux} .syms ${kallsymso_prev}
178178 kallsyms ${kallsyms_vmlinux} .syms ${kallsyms_S}
179179
180180 info AS ${kallsyms_S}
@@ -188,7 +188,7 @@ kallsyms_step()
188188mksysmap ()
189189{
190190 info NM ${2}
191- ${CONFIG_SHELL} " ${srctree} /scripts/mksysmap" ${1} ${2}
191+ ${CONFIG_SHELL} " ${srctree} /scripts/mksysmap" ${1} ${2} ${3}
192192}
193193
194194sorttable ()
@@ -277,7 +277,7 @@ if is_enabled CONFIG_DEBUG_INFO_BTF && is_enabled CONFIG_BPF; then
277277 ${RESOLVE_BTFIDS} vmlinux
278278fi
279279
280- mksysmap vmlinux System.map
280+ mksysmap vmlinux System.map ${kallsymso}
281281
282282if is_enabled CONFIG_BUILDTIME_TABLE_SORT; then
283283 info SORTTAB vmlinux
Original file line number Diff line number Diff line change 44# tools to retrieve the actual addresses of symbols in the kernel.
55#
66# Usage
7- # mksysmap vmlinux System.map
7+ # mksysmap vmlinux System.map [exclude]
88
99
1010# ####
@@ -52,4 +52,13 @@ ${NM} -n ${1} | sed >${2} -e "
5252
5353# for LoongArch?
5454/ L0$/d
55+
56+ # ---------------------------------------------------------------------------
57+ # Ignored kallsyms symbols
58+ #
59+ # If the 3rd parameter exists, symbols from it will be omitted from the output.
60+ # This makes kallsyms have the identical symbol lists in the step 1 and 2.
61+ # Without this, the step2 would get new symbols generated by scripts/kallsyms.c
62+ # when CONFIG_KALLSYMS_ALL is enabled. That might require one more pass.
63+ $( if [ $# -ge 3 ]; then ${NM} ${3} | sed -n ' / U /!s:.* \([^ ]*\)$:/ \1$/d:p' ; fi)
5564"
You can’t perform that action at this time.
0 commit comments