From: Sam Ravnborg <sam@ravnborg.org>
To: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
Linus Torvalds <torvalds@osdl.org>
Subject: [12/12] kbuild: __crc_* symbols in System.map
Date: Fri, 13 Aug 2004 21:52:38 +0200 [thread overview]
Message-ID: <20040813195238.GL10556@mars.ravnborg.org> (raw)
In-Reply-To: <20040813192804.GA10486@mars.ravnborg.org>
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/08/13 20:14:30+02:00 sam@mars.ravnborg.org
# kbuild: __crc_* symbols in System.map
#
# David S. Miller <davem@redhat.com> wrote:
# Shouldn't we be grepping __crc_ symbols out of the System.map file?
#
# For one thing, these can confuse readprofile. It's algorithm is
# to start at _stext, then stop when it sees a line in the System.map
# which is not text (mode is one of 'T' 't' 'W' or 'w')
#
# It will exit early if there are some intermixed __crc_* things in
# there (since they are are mode 'A').
#
# For example, in my current sparc64 kernel I have this:
#
# 00000000004cef80 t do_split
# 00000000004cf2a0 t add_dirent_to_buf
# 00000000004cf5a7 A __crc_init_special_inode
# 00000000004cf640 t make_indexed_dir
# 00000000004cf900 t ext3_add_entry
#
# So no symbols after add_dirent_to_buf will be shown in the profiling
# output of readprofile.
#
# Implementation ported to mksysmap by Sam.
# Included two System.map related fixes:
# - Print "SYSMAP System.map" during build
# - Sort symbols in System.map
#
# Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
#
# scripts/mksysmap
# 2004/08/13 20:14:14+02:00 sam@mars.ravnborg.org +8 -1
# Remove __crc_ symbols from System.map
# Now also sort the output; '-n' option to nm
#
# Makefile
# 2004/08/13 20:14:14+02:00 sam@mars.ravnborg.org +6 -6
# Print out:
# SYSMAP System.map
# during build.
#
diff -Nru a/Makefile b/Makefile
--- a/Makefile 2004-08-13 21:07:25 +02:00
+++ b/Makefile 2004-08-13 21:07:25 +02:00
@@ -608,12 +608,12 @@
define rule_vmlinux
$(rule_vmlinux__);
- $(Q)$(if $($(quiet)cmd_sysmap), \
- echo ' $($(quiet)cmd_sysmap) $@' &&) \
- $(cmd_sysmap) $@ System.map; \
- if [ $$? -ne 0 ]; then \
- rm -f $@; \
- /bin/false; \
+ $(Q)$(if $($(quiet)cmd_sysmap), \
+ echo ' $($(quiet)cmd_sysmap) System.map' &&) \
+ $(cmd_sysmap) $@ System.map; \
+ if [ $$? -ne 0 ]; then \
+ rm -f $@; \
+ /bin/false; \
fi;
$(rule_verify_kallsyms)
endef
diff -Nru a/scripts/mksysmap b/scripts/mksysmap
--- a/scripts/mksysmap 2004-08-13 21:07:25 +02:00
+++ b/scripts/mksysmap 2004-08-13 21:07:25 +02:00
@@ -51,4 +51,11 @@
# U - undefined global symbols
# w - local weak symbols
-nm $1 | grep -v ' [aUw] ' > $2
+# readprofile starts reading symbols when _stext is found, and
+# continue until it finds a symbol which is not either of 'T', 't',
+# 'W' or 'w'. __crc_ are 'A' and placed in the middle
+# so we just ignore them to let readprofile continue to work.
+# (At least sparc64 has __crc_ in the middle).
+
+$NM -n $1 | grep -v '\( [aUw] \)\|\(__crc_\)' > $2
+
prev parent reply other threads:[~2004-08-13 19:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-13 19:28 kbuild updates Sam Ravnborg
2004-08-13 19:45 ` [1/12] kbuild: Check for undefined symbols in vmlinux Sam Ravnborg
2004-08-13 19:45 ` [2/12] kbuild/sparc: Use new generic mksysmap script to generate System.map Sam Ravnborg
2004-08-13 19:46 ` [3/12] kconfig: save kernel version in .config file Sam Ravnborg
2004-08-13 19:47 ` [4/12] kbuild: Selective compile of targets in scripts/ Sam Ravnborg
2004-08-13 19:47 ` [5/12] kbuild: Use LINUXINCLUDE to specify include/ directory Sam Ravnborg
2004-08-13 19:48 ` [6/12] kbuild: Accept absolute paths in clean-files and introduce clean-dirs Sam Ravnborg
2004-08-13 19:49 ` [7/12] kbuild: Separate out host-progs handling Sam Ravnborg
2004-08-14 8:04 ` Coywolf Qi Hunt
2004-08-13 19:50 ` [8/12] kbuild: Introduce hostprogs-y, deprecate host-progs Sam Ravnborg
2004-08-13 19:51 ` [9/12] kbuild: Replace host-progs with hostprogs-y Sam Ravnborg
2004-08-13 19:51 ` [10/12] kbuild: Fix hostprogs-y Sam Ravnborg
2004-08-13 19:52 ` [11/12] kbuild: Use POSIX headers for ntoh functions Sam Ravnborg
2004-08-13 19:52 ` Sam Ravnborg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040813195238.GL10556@mars.ravnborg.org \
--to=sam@ravnborg.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®