From: William Lee Irwin III <wli@holomorphy.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.8.1-mm1
Date: Mon, 16 Aug 2004 23:20:17 -0700 [thread overview]
Message-ID: <20040817062017.GL11200@holomorphy.com> (raw)
In-Reply-To: <20040816143710.1cd0bd2c.akpm@osdl.org>
On Mon, Aug 16, 2004 at 02:37:10PM -0700, Andrew Morton wrote:
> handle-undefined-symbols.patch
> Fail if vmlinux contains undefined symbols
> sparc32-ignore-undefined-symbols-with-3-or-more-leading-underscores.patch
> sparc32: ignore undefined symbols with 3 or more leading underscores
Okay, this patch has officially made my shitlist along with whatever
introduced the second check. The following appears to be necessary to
get sparc64 to link, which of course clashes wildly with the UML
changes to get *it* to link.
And why the Hell are we checking twice??? Check #2 lagging behind
check #1 wrt. updates caused a relatively large amount of pain as I had
to scour the whole damn tree for where the Hell check #2 was happening
and that on a relatively slow box as my faster sparc64 box is down until
ambient temperature regulation issues are mitigated by weather.
This scripting crap is fragile and nightmarish. We should probably be
examining the ELF bits directly in C.
-- wli
Index: mm1-2.6.8.1/Makefile
===================================================================
--- mm1-2.6.8.1.orig/Makefile 2004-08-16 21:09:23.000000000 -0700
+++ mm1-2.6.8.1/Makefile 2004-08-16 23:06:39.530357000 -0700
@@ -542,8 +542,29 @@
$(if $($(quiet)cmd_vmlinux__), \
echo ' $($(quiet)cmd_vmlinux__)' &&) \
$(cmd_vmlinux__); \
- if $(OBJDUMP) --syms $@ | $(AWK) '$$4!~/^___.*/ { print $$0 }' \
- | egrep -q '^([^R]|R[^E]|RE[^G])[^w]*\*UND\*'; then \
+ if $(OBJDUMP) --syms $@ \
+ | $(AWK) 'BEGIN { \
+ status = 1 \
+ } \
+ $$4 !~ /^___.*/ && $$1 !~ /^REG.*/ { \
+ for (i = 0; i < NF; ++i) { \
+ if ($$i == "*UND*") { \
+ for (j = i - 1; j >= 0; --j) { \
+ if ($$j == "w") \
+ break; \
+ } \
+ if (j < 0) { \
+ printf "undefined!!\n"; \
+ print $$0; \
+ status = 0 \
+ } \
+ } \
+ } \
+ } \
+ END { \
+ exit status \
+ }'; \
+ then \
echo 'ldchk: $@: final image has undefined symbols:'; \
$(NM) $@ | sed 's/^ *U \(.*\)/ \1/p;d'; \
$(RM) -f $@; \
Index: mm1-2.6.8.1/scripts/mksysmap
===================================================================
--- mm1-2.6.8.1.orig/scripts/mksysmap 2004-08-16 21:07:48.000000000 -0700
+++ mm1-2.6.8.1/scripts/mksysmap 2004-08-16 23:07:40.852035000 -0700
@@ -18,9 +18,31 @@
# 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 ' ___'
+if $(OBJDUMP) --syms $@ \
+ | $(AWK) 'BEGIN { \
+ status = 1 \
+ } \
+ $$4 !~ /^___.*/ && $$1 !~ /^REG.*/ { \
+ for (i = 0; i < NF; ++i) { \
+ if ($$i == "*UND*") { \
+ for (j = i - 1; j >= 0; --j) { \
+ if ($$j == "w") \
+ break; \
+ } \
+ if (j < 0) { \
+ printf "undefined!!\n"; \
+ print $$0; \
+ status = 0 \
+ } \
+ } \
+ } \
+ } \
+ END { \
+ exit status \
+ }'; \
+ then
+ echo "$1: error: undefined symbol(s) found:"
+ $NM -u $1 | grep -v ' ___'
exit 1
fi
next prev parent reply other threads:[~2004-08-17 6:20 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-16 21:37 2.6.8.1-mm1 Andrew Morton
2004-08-16 21:47 ` 2.6.8.1-mm1 Christoph Hellwig
2004-08-17 13:20 ` 2.6.8.1-mm1 Frediano Ziglio
2004-08-18 23:57 ` 2.6.8.1-mm1 Peter Osterlund
2004-08-19 9:45 ` 2.6.8.1-mm1 Christoph Hellwig
2004-08-20 5:44 ` 2.6.8.1-mm1 Peter Osterlund
2004-08-20 6:03 ` 2.6.8.1-mm1 Christoph Hellwig
2004-08-16 22:30 ` 2.6.8.1-mm1 Bartlomiej Zolnierkiewicz
2004-08-16 21:51 ` 2.6.8.1-mm1 Alan Cox
2004-08-16 23:25 ` 2.6.8.1-mm1 Arkadiusz Miskiewicz
2004-08-16 23:39 ` 2.6.8.1-mm1 Martin J. Bligh
2004-08-17 1:32 ` 2.6.8.1-mm1 Nathan Lynch
2004-08-17 6:59 ` 2.6.8.1-mm1 Sam Ravnborg
2004-08-17 6:25 ` 2.6.8.1-mm1 Martin J. Bligh
2004-08-17 6:38 ` 2.6.8.1-mm1 Andrew Morton
2004-08-17 7:00 ` 2.6.8.1-mm1 William Lee Irwin III
2004-08-17 7:05 ` 2.6.8.1-mm1 William Lee Irwin III
2004-08-17 3:07 ` 2.6.8.1-mm1 William Lee Irwin III
2004-08-17 3:09 ` 2.6.8.1-mm1 William Lee Irwin III
2004-08-17 3:19 ` 2.6.8.1-mm1 Andrew Morton
2004-08-17 3:41 ` 2.6.8.1-mm1 William Lee Irwin III
2004-08-17 4:16 ` 2.6.8.1-mm1 Nick Piggin
2004-08-17 14:38 ` 2.6.8.1-mm1 (compile stats) John Cherry
2004-08-17 5:59 ` 2.6.8.1-mm1 Nathan Lynch
2004-08-17 7:19 ` 2.6.8.1-mm1 Rusty Russell
2004-08-17 8:45 ` [patch] new-task-fix.patch, 2.6.8.1-mm1 Ingo Molnar
2004-08-17 11:35 ` Nick Piggin
2004-08-17 11:38 ` 2.6.8.1-mm1 Srivatsa Vaddagiri
2004-08-17 17:53 ` 2.6.8.1-mm1 Andrew Morton
2004-08-18 1:04 ` 2.6.8.1-mm1 Rusty Russell
2004-08-18 17:36 ` 2.6.8.1-mm1 Nathan Lynch
2004-08-17 6:20 ` William Lee Irwin III [this message]
2004-08-17 6:40 ` 2.6.8.1-mm1 sam
2004-08-17 7:05 ` 2.6.8.1-mm1 Nathan Lynch
2004-08-17 13:39 ` 2.6.8.1-mm1 Zwane Mwaikambo
2004-08-17 12:54 ` 2.6.8.1-mm1 William Lee Irwin III
2004-08-17 14:15 ` 2.6.8.1-mm1 William Lee Irwin III
2004-08-17 21:59 ` ldchk -> arch/arm/Makefile? [Was: 2.6.8.1-mm1] Sam Ravnborg
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=20040817062017.GL11200@holomorphy.com \
--to=wli@holomorphy.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.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