[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'final link failed: Bad value' when building Linux/MIPS kernels.

From: Steven J. Hill
Subject: 'final link failed: Bad value' when building Linux/MIPS kernels.
Date: Thu, 15 Mar 2007 21:35:42 -0500
User-agent: Thunderbird (X11/20070306)


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:


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 > will produce
the error. The regression appeared in binutils- and still
exists. The simple patch is:

   --- binutils-
   +++ binutils-
   @@ -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;


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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]