From: Dave Hansen <haveblue@us.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Russell King <rmk+lkml@arm.linux.org.uk>
Subject: Re: 2.6.8-rc2-mm1 link errors
Date: Wed, 28 Jul 2004 17:00:30 -0700 [thread overview]
Message-ID: <1091059230.2871.676.camel@nighthawk> (raw)
In-Reply-To: <20040728164920.5ad4c114.akpm@osdl.org>
On Wed, 2004-07-28 at 16:49, Andrew Morton wrote:
> Dave Hansen <haveblue@us.ibm.com> wrote:
> >
> > I'm getting some odd link errors from -rc2-mm1 that don't happen in
> > -rc1-mm1, or plain -rc2:
> >
> > LD .tmp_vmlinux1
> > ldchk: .tmp_vmlinux1: final image has undefined symbols:
> >
> >
> > <bunch of blank lines>
> >
> >
> > make: *** [.tmp_vmlinux1] Error 1
> >
> > Any ideas?
>
> Nope. Could you take a look at the code in the top-level
> Makefile which is doing this, work out why it broke?
Well, it's this patch. cc'ing Russell...
I'd tend to think it's a false-positive, not a real problem that's just
being detected now. Is the sed part of the patch borked?
-----
From: Russell King <rmk+lkml@arm.linux.org.uk>
The only issue with this is that, when a problem is detected, the
reported symbols will also include the Sparc64 register symbols.
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
25-akpm/Makefile | 8 ++++++++
1 files changed, 8 insertions(+)
diff -puN Makefile~handle-undefined-symbols Makefile
--- 25/Makefile~handle-undefined-symbols 2004-07-26 23:24:30.552753872 -0700
+++ 25-akpm/Makefile 2004-07-26 23:24:30.556753264 -0700
@@ -525,6 +525,8 @@ endef
# set -e makes the rule exit immediately on error
+# Note: Ensure that there are no undefined symbols in the final
+# linked image. Not doing this can lead to silent link failures.
define rule_vmlinux__
+set -e; \
$(if $(filter .tmp_kallsyms%,$^),, \
@@ -536,6 +538,12 @@ define rule_vmlinux__
$(if $($(quiet)cmd_vmlinux__), \
echo ' $($(quiet)cmd_vmlinux__)' &&) \
$(cmd_vmlinux__); \
+ if $(OBJDUMP) --syms $@ | egrep -q '^([^R]|R[^E]|RE[^G])[^w]*\*UND\*'; then \
+ echo 'ldchk: $@: final image has undefined symbols:'; \
+ $(NM) $@ | sed 's/^ *U \(.*\)/ \1/p;d'; \
+ $(RM) -f $@; \
+ exit 1; \
+ fi; \
echo 'cmd_$@ := $(cmd_vmlinux__)' > $(@D)/.$(@F).cmd
endef
_
-- Dave
next prev parent reply other threads:[~2004-07-29 0:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-28 23:27 2.6.8-rc2-mm1 link errors Dave Hansen
2004-07-28 23:49 ` Andrew Morton
2004-07-29 0:00 ` Dave Hansen [this message]
2004-07-29 2:06 ` Dave Hansen
2004-07-29 2:12 ` Matt Mackall
2004-07-29 2:25 ` Dave Hansen
2004-07-29 21:07 ` Adrian Bunk
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=1091059230.2871.676.camel@nighthawk \
--to=haveblue@us.ibm.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk+lkml@arm.linux.org.uk \
/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