From: Sam Ravnborg <sam@ravnborg.org>
To: William Lee Irwin III <wli@holomorphy.com>,
Sam Ravnborg <sam@ravnborg.org>, Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org, rmk-lkml@arm.linux.org.uk
Subject: Re: 2.6.8-rc2-mm1
Date: Tue, 3 Aug 2004 22:46:16 +0200 [thread overview]
Message-ID: <20040803204616.GA20655@mars.ravnborg.org> (raw)
In-Reply-To: <20040801235729.GZ2334@holomorphy.com>
On Sun, Aug 01, 2004 at 04:57:29PM -0700, William Lee Irwin III wrote:
Content-Description: brief message
> On Sun, Aug 01, 2004 at 11:11:46PM +0200, Sam Ravnborg wrote:
> > Took a look at this and atm compiling a sparc tool-chain to try it out.
> > What about moving the check added by rmk to kallsyms.c?
> > This would remove the extra pass on vmlinux which is for no use for
> > most people anyway. On the other hand an error could go unpassed
> > because we (for now) do not do the kallsyms stuff if not configured in.
> > We could make the kallsyms run independent on the configuration, but
> > only link in the symbols if required to do so.
> > This would also allow us to have architecture specific final-linking
> > rules in one place if sparc needs special rules.
> > Today kallsyms already knows about 'SDA_BASE*_' only valid for ppc.
> > wli - can you post the output of a failing sparc compile?
>
> The only part that fails is the ldchk part (unique to -mm), which is
> just happening prematurely. Here's a log.
Thanks.
I have been looking into this - and got sidetracked by coding an Elf
parser to replace usage of nm & friends. I abandoned this idea
again - there was not much gain in the end.
For sparc the rule seems to be:
symbols starting with ___ are legal to be undefined, they will
be fixed up later.
Following the code in btfixupprep.c gave me an headace..
A few comments with sample output from objdump would have helped a lot.
For now I'm working with the idea to move generation of System.map to a
separate shell script 'scripts/mksystemmap'.
As a sideeffect let this script check for potential undefined symbols.
Either ignore ___* symbols always or make this a sparc special case.
Compared to rmk's original patch this would only execute the check once.
sparc can use the same script when generating the final image.
I did not use sed to make a nice output of undefined symbols to avoid
only seeing a bunch of empty lines as Dave Hansen reported in one case.
Sam
First version of the (simple) script.
Direct reference to nm only for testing purpose.
Too late so no patch..
#!/bin/sh -e
# From the vmlinux file create the System.map file
# System.map is used by various debugging tools to retreive the actual
# addresses of symbols in the kernel.
# The optional kallsyms file in /proc/kallsyms serve the same purpose
# While 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
# mksystemmap vmlinux System.map
# $(NM) produces the following output:
# f0081e80 T alloc_vfsmnt
# The second row specify the type f 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
nm $1 | grep -v ' [aUw] ' > $2
# Any undefined symbols?
UNDEF=`nm -u $1 | grep -v ' ____'`
UNDEFCNT=`echo $UNDEF | wc -l`
if [ $UNDEFCNT ]; then
echo $0: Found $UNDEFCNT undefined symbols:
nm -u $1
echo This may signal in error in bin-utils
exit 1
fi
exit 0
prev parent reply other threads:[~2004-08-03 20:45 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-28 9:04 2.6.8-rc2-mm1 Andrew Morton
2004-07-28 16:36 ` 2.6.8-rc2-mm1 Jesse Barnes
2004-07-28 17:08 ` 2.6.8-rc2-mm1 (compile stats) John Cherry
2004-07-28 19:37 ` 2.6.8-rc2-mm1 Peter Osterlund
2004-07-28 22:24 ` 2.6.8-rc2-mm1 Johannes Stezenbach
2004-07-28 22:44 ` 2.6.8-rc2-mm1 viro
2004-07-28 23:24 ` 2.6.8-rc2-mm1 Johannes Stezenbach
2004-07-28 23:34 ` 2.6.8-rc2-mm1 Andrew Morton
2004-07-29 0:08 ` 2.6.8-rc2-mm1 Johannes Stezenbach
2004-07-29 6:42 ` 2.6.8-rc2-mm1 Andrew Morton
2004-07-29 19:35 ` 2.6.8-rc2-mm1 Michael Hunold
2004-07-29 21:02 ` 2.6.8-rc2-mm1 Andrew Morton
2004-07-28 22:49 ` 2.6.8-rc2-mm1 Adam Kropelin
2004-07-28 23:20 ` 2.6.8-rc2-mm1 Andrew Morton
2004-07-28 23:13 ` 2.6.8-rc2-mm1 Paul Jackson
2004-07-29 14:36 ` 2.6.8-rc2-mm1 Adrian Bunk
2004-07-29 19:36 ` 2.6.8-rc2-mm1 David Woodhouse
2004-07-29 14:41 ` 2.6.8-rc2-mm1: NTFS compile error with gcc 2.95 Adrian Bunk
2004-07-29 15:54 ` Jan-Benedict Glaw
2004-07-29 20:42 ` [patch] " Adrian Bunk
[not found] ` <Pine.LNX.4.60.0407292249120.25661@hermes-1.csi.cam.ac.uk>
2004-07-29 23:18 ` Adrian Bunk
2004-07-29 21:27 ` 2.6.8-rc2-mm1: DVB: "errno" undefined Adrian Bunk
2004-07-29 22:44 ` Kenneth Aafløy
2004-07-29 23:24 ` Adrian Bunk
2004-07-30 14:30 ` Arnd Bergmann
2004-07-31 10:09 ` 2.6.8-rc2-mm1 breaks PPPoE for me (was: 2.6.8-rc2-mm1) Matthias Andree
2004-07-31 16:39 ` 2.6.8-rc2-mm1 Zwane Mwaikambo
2004-07-31 18:47 ` 2.6.8-rc2-mm1 Andrew Morton
2004-07-31 19:54 ` 2.6.8-rc2-mm1 Zwane Mwaikambo
2004-07-31 20:09 ` 2.6.8-rc2-mm1 Zwane Mwaikambo
2004-07-31 20:21 ` 2.6.8-rc2-mm1 Andrew Morton
2004-08-01 4:21 ` 2.6.8-rc2-mm1 Zwane Mwaikambo
2004-08-01 11:16 ` 2.6.8-rc2-mm1 Ingo Molnar
2004-08-01 11:05 ` 2.6.8-rc2-mm1 Ingo Molnar
2004-08-01 2:36 ` 2.6.8-rc2-mm1 William Lee Irwin III
2004-08-01 8:05 ` 2.6.8-rc2-mm1 Andrew Morton
2004-08-01 12:33 ` 2.6.8-rc2-mm1 William Lee Irwin III
2004-08-01 21:11 ` 2.6.8-rc2-mm1 Sam Ravnborg
2004-08-01 23:57 ` 2.6.8-rc2-mm1 William Lee Irwin III
2004-08-03 20:46 ` 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=20040803204616.GA20655@mars.ravnborg.org \
--to=sam@ravnborg.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk-lkml@arm.linux.org.uk \
--cc=wli@holomorphy.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.