All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Linux Kernel List <linux-kernel@vger.kernel.org>
Cc: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>
Subject: Re: binutils woes
Date: Sun, 11 Jul 2004 14:56:39 +0100	[thread overview]
Message-ID: <20040711145639.A23328@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20040701175231.B8389@flint.arm.linux.org.uk>; from rmk+lkml@arm.linux.org.uk on Thu, Jul 01, 2004 at 05:52:31PM +0100

On Thu, Jul 01, 2004 at 05:52:31PM +0100, Russell King wrote:
> On ARM, we appear to have somewhat of a problem with binutils.  At
> least the following binutils suffer from a problem whereby it is
> possible to create programs which contain undefined symbols:

Ok, here's the latest version of the patch.  It shouldn't complain
on Sparc64, and neither should it complain while linking the
.tmp_vmlinux* objects - the original regexp on the objdump --syms
output was catching the weak kallsyms symbols.

The only issue with this is that, when a problem is detected, the
reported symbols will also include the Sparc64 register symbols.

===== Makefile 1.500 vs edited =====
--- 1.500/Makefile	Tue Jun 29 15:44:49 2004
+++ edited/Makefile	Sun Jul 11 14:52:37 2004
@@ -534,6 +534,8 @@
 
 #	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%,$^),,				\
@@ -545,6 +547,12 @@
 	$(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
 


-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

      parent reply	other threads:[~2004-07-11 13:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-01 16:52 binutils woes Russell King
2004-07-01 17:47 ` Tom Rini
2004-07-01 18:07   ` Russell King
2004-07-01 19:44     ` Martin Schlemmer
2004-07-01 19:52       ` Russell King
2004-07-01 22:12         ` Russell King
2004-07-01 22:21           ` Andrew Morton
2004-07-01 22:22             ` Russell King
2004-07-02 10:56 ` Michael Buesch
2004-07-11 11:32 ` Russell King
2004-07-11 13:56 ` Russell King [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=20040711145639.A23328@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --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 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.