From: "Steven J. Hill" <sjhill@realitydiluted.com>
To: bug-binutils@gnu.org
Cc: linux-mips@linux-mips.org, hjl@lucon.org
Subject: 'final link failed: Bad value' when building Linux/MIPS kernels.
Date: Thu, 15 Mar 2007 21:35:42 -0500 [thread overview]
Message-ID: <45FA027E.2080901@realitydiluted.com> (raw)
Greetings.
I have been chasing down a binutils regression that is preventing me from
building a Linux/MIPS kernel using a gcc-4.2 based toolchain. Here is the
snippet of output when building a 2.6.12 kernel for my platform:
LD drivers/mtd/maps/built-in.o
LD drivers/mtd/nand/built-in.o
LD drivers/mtd/built-in.o
mipsel-linux-uclibc-ld: final link failed: Bad value
make[1]: *** [drivers/mtd/built-in.o] Error 1
make: *** [_module_drivers/mtd] Error 2
The versions were:
binutils-2.17.50.0.12
gcc-4.2-20070131
linux-headers-2.6.12
Using the release version of binutils-2.17 works fine and does not
produce the error above. However, binutils-HEAD out of today's CVS
and all of H.J. Lu's development releases > 2.17.50.0.3 will produce
the error. The regression appeared in binutils-2.17.50.0.4 and still
exists. The simple patch is:
--- binutils-2.17.50.0.12/bfd/elfxx-mips.c
+++ binutils-2.17.50.0.12-patched/bfd/elfxx-mips.c
@@ -3603,12 +3603,9 @@
const Elf_Internal_Rela *relocation,
const Elf_Internal_Rela *relend)
{
- unsigned long r_symndx = ELF_R_SYM (abfd, relocation->r_info);
-
while (relocation < relend)
{
- if (ELF_R_TYPE (abfd, relocation->r_info) == r_type
- && ELF_R_SYM (abfd, relocation->r_info) == r_symndx)
+ if (ELF_R_TYPE (abfd, relocation->r_info) == r_type)
return relocation;
++relocation;
I applied to binutils-HEAD and was then able to build a valid Linux/MIPS
kernel and applications. I need to move on to other items, but if someone
could comment or have a look at this, it would be much appreciated. If a
better formatted bug report should be submitted somewhere, just let me
know. Thanks.
-Steve
next reply other threads:[~2007-03-16 2:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-16 2:35 Steven J. Hill [this message]
2007-03-16 4:17 ` 'final link failed: Bad value' when building Linux/MIPS kernels H. J. Lu
2007-03-16 13:09 ` Paul Koning
2007-03-16 14:45 ` H. J. Lu
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=45FA027E.2080901@realitydiluted.com \
--to=sjhill@realitydiluted.com \
--cc=bug-binutils@gnu.org \
--cc=hjl@lucon.org \
--cc=linux-mips@linux-mips.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.