From: Sam Ravnborg <sam@ravnborg.org>
To: "David S. Miller" <davem@redhat.com>
Cc: Sam Ravnborg <sam@ravnborg.org>,
torvalds@osdl.org, akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH]: __crc_* symbols in System.map
Date: Fri, 13 Aug 2004 20:02:39 +0200 [thread overview]
Message-ID: <20040813180239.GA7571@mars.ravnborg.org> (raw)
In-Reply-To: <20040812000558.220d7e5d.davem@redhat.com>
On Thu, Aug 12, 2004 at 12:05:58AM -0700, David S. Miller wrote:
> On Thu, 12 Aug 2004 07:01:36 +0200
> Sam Ravnborg <sam@ravnborg.org> wrote:
>
> > Would it be an option to skip all 'A' symbols?
>
> I doubt it. Symbols defined via the linker script will
> end up as " A ". On sparc64 this happens for swapper_pmd_dir,
> empty_pg_dir, _etext, _edata, and _end for example.
Did a:
nm vmlinux | grep ' A ' | grep -v '__crc_' | wc -l
32
So yep.
Modified your patch to match my tree - patched soon to appear at lkml.
Sam
In my tree I now have a script to generate System.map - that now looks like this:
#!/bin/sh -x
# Based on the vmlinux file create the System.map file
# System.map is used by module-init tools and some debugging
# tools to retreive the actual addresses of symbols in the kernel.
#
# Before creating the System.map file as a sideeffect check for
# undefined symbols.
# At least one version of the ARM bin-utils did not error out on
# undefined symbols, so catch them here instead.
# Usage
# mksysmap vmlinux System.map
#####
# Check for undefined symbols.
# Undefined symbols with three leading underscores are ignored since
# they are used by the sparc BTFIXUP logic - and is assumed to be undefined.
if [ "`$NM -u $1 | grep -v ' ___'`" != "" ]; then
echo "$1: error: undefined symbol(s) found:"
$NM -u $1 | grep -v ' ___'
exit 1
fi
#####
# Generate System.map (actual filename passed as second argument)
# $NM produces the following output:
# f0081e80 T alloc_vfsmnt
# The second row specify the type of the symbol:
# A = Absolute
# B = Uninitialised data (.bss)
# C = Comon symbol
# D = Initialised data
# G = Initialised data for small objects
# I = Indirect reference to another symbol
# N = Debugging symbol
# R = Read only
# S = Uninitialised data for small objects
# T = Text code symbol
# U = Undefined symbol
# V = Weak symbol
# W = Weak symbol
# Corresponding small letters are local symbols
# For System.map filter away:
# a - local absolute symbols
# U - undefined global symbols
# w - local weak symbols
# 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 '\( [aUw] \)\|\(__crc_\)' > $2
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2004-08-13 18:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-12 3:55 [PATCH]: __crc_* symbols in System.map David S. Miller
2004-08-12 5:01 ` Sam Ravnborg
2004-08-12 7:05 ` David S. Miller
2004-08-13 18:02 ` Sam Ravnborg [this message]
2004-08-13 18:10 ` Sam Ravnborg
2004-08-13 20:18 ` David S. Miller
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=20040813180239.GA7571@mars.ravnborg.org \
--to=sam@ravnborg.org \
--cc=akpm@osdl.org \
--cc=davem@redhat.com \
--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