summaryrefslogtreecommitdiffstats
path: root/scripts/mksysmap
AgeCommit message (Collapse)AuthorFilesLines
2022-10-03kallsyms: ignore __kstrtab_* and __kstrtabns_* symbolsMasahiro Yamada1-0/+4
Every EXPORT_SYMBOL creates __kstrtab_* and __kstrtabns_*, which consumes 15-20% of the kallsyms entries. For example, on the system built from the x86_64 defconfig, $ cat /proc/kallsyms | wc 129527 388581 5685465 $ cat /proc/kallsyms | grep __kstrtab | wc 23489 70467 1187932 We already ignore __crc_* symbols populated by EXPORT_SYMBOL, so it should be fine to ignore __kstrtab_* and __kstrtabns_* as well. This makes vmlinux a bit smaller. $ size vmlinux.before vmlinux.after text data bss dec hex filename 22785374 8559694 1413328 32758396 1f3da7c vmlinux.before 22785374 8137806 1413328 32336508 1ed6a7c vmlinux.after Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2022-10-02kallsyms: drop duplicated ignore patterns from kallsyms.cMasahiro Yamada1-1/+13
Now that kallsyms.c parses the output from mksysmap, some symbols have already been dropped. Move comments to scripts/mksysmap. Also, make the grep command readable. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2022-10-02mksysmap: update comment about __crc_*Masahiro Yamada1-4/+4
Since commit 7b4537199a4a ("kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS"), __crc_* symbols never become absolute. Keep ignoring __crc_*, but update the comment. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2022-09-10mksysmap: Fix the mismatch of 'L0' symbols in System.mapYouling Tang1-1/+1
When System.map was generated, the kernel used mksysmap to filter the kernel symbols, we need to filter "L0" symbols in LoongArch architecture. $ cat System.map | grep L0 9000000000221540 t L0 The L0 symbol exists in System.map, but not in .tmp_System.map. When "cmp -s System.map .tmp_System.map" will show "Inconsistent kallsyms data" error message in link-vmlinux.sh script. Signed-off-by: Youling Tang <tangyouling@loongson.cn> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-06-06mksysmap: Fix the mismatch of '.L' symbols in System.mapashimida1-1/+1
When System.map was generated, the kernel used mksysmap to filter the kernel symbols, but all the symbols with the second letter 'L' in the kernel were filtered out, not just the symbols starting with 'dot + L'. For example: ashimida@ubuntu:~/linux$ cat System.map |grep ' .L' ashimida@ubuntu:~/linux$ nm -n vmlinux |grep ' .L' ffff0000088028e0 t bLength_show ...... ffff0000092e0408 b PLLP_OUTC_lock ffff0000092e0410 b PLLP_OUTA_lock The original intent should be to filter out all local symbols starting with '.L', so the dot should be escaped. Fixes: 00902e984732 ("mksysmap: Add h8300 local symbol pattern") Signed-off-by: ashimida <ashimida@linux.alibaba.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2015-06-23mksysmap: Add h8300 local symbol patternYoshinori Sato1-1/+1
h8300's nm output have a lot of local symbols. ex) 00000000 N .Lframe0 00000013 N .LLST1 00000026 N .LLST2 00000039 N .LLST3 0000004c N .LLST4 Added new pattern " .L" to filter rule. Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
2014-08-20kbuild: Make scripts executableMichal Marek1-0/+0
The Makefiles call the respective interpreter explicitly, but this makes it easier to use the scripts manually. Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-06-10kbuild: trivial - remove trailing empty linesMasahiro Yamada1-1/+0
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2012-07-20trivial: typo in comment in mksysmapMasatake YAMATO1-1/+1
Signed-off-by: Masatake YAMATO <yamato@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-14Revert "kbuild: strip generated symbols from *.ko"Sam Ravnborg1-2/+5
This reverts commit ad7a953c522ceb496611d127e51e278bfe0ff483. And commit: ("allow stripping of generated symbols under CONFIG_KALLSYMS_ALL") 9bb482476c6c9d1ae033306440c51ceac93ea80c These stripping patches has caused a set of issues: 1) People have reported compatibility issues with binutils due to lack of support for `--strip-unneeded-symbols' with objcopy 2.15.92.0.2 Reported by: Wenji 2) ccache and distcc no longer works as expeced Reported by: Ted, Roland, + others 3) The installed modules increased a lot in size Reported by: Ted, Davej + others Reported-by: Wenji Huang <wenji.huang@oracle.com> Reported-by: "Theodore Ts'o" <tytso@mit.edu> Reported-by: Dave Jones <davej@redhat.com> Reported-by: Roland McGrath <roland@redhat.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-12-19kbuild: strip generated symbols from *.koJan Beulich1-5/+2
This patch changes the way __crc_ symbols are being resolved from using ld to do so to using the assembler, thus allowing these symbols to be marked local (the linker creates then as global ones) and hence allow stripping (for modules) or ignoring (for vmlinux) them. While at this, also strip other generated symbols during module installation. One potentially debatable point is the handling of the flags passeed to gcc when translating the intermediate assembly file into an object: passing $(c_flags) unchanged doesn't work as gcc passes --gdwarf2 to gas whenever is sees any -g* option, even for -g0, and despite the fact that the compiler would have already produced all necessary debug info in the C->assembly translation phase. I took the approach of just filtering out all -g* options, but an alternative to such negative filtering might be to have a positive filter which might, in the ideal case allow just all the -Wa,* options to pass through. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-05-19kbuild: filter away debug symbols from kernel symbolsSam Ravnborg1-1/+2
Andi Kleen <andi@firstfloor.org> reported that he saw a lot of symbols like this: 0000000000000b24 N DW.aio.h.903a6d92.2 0000000000000bce N DW.task_io_accounting.h.8d8de327.0 0000000000000bec N DW.hrtimer.h.c23659c6.0 in his System.map / kallsyms output. Simple solution is to skip all debugging symbols (they are marked 'N'). Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Paulo Marques <pmarques@grupopie.com>
2006-01-10spelling: s/retreive/retrieve/Adrian Bunk1-1/+1
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2005-04-16Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds1-0/+44
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!