This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: n32, irix 6.5, bfd


Timothy Daly wrote:
> 
> When linking n32 objects with the ld from cvs, I get the following
> problem:
> 
> /usr/local/bin/ld: final link failed: Bad value
> 
> The tiny patch to elf32-mips.c at the end of this message fixed it -
> but it's almost certainly not correct.  
> 
> According to the mips abi supplement, when a relocation of type
> R_MIPS_GOT16 refers to a local symbol, it must be followed
> immediately by an R_MIPS_LO16 relocation.

Please note that n32 ABI is a slightly adapted n64 ABI. Both prefer to
use RELA relocations to hold addends. The code you are looking at is
about extracting addends from several REL relocations and shouldn't be
used for NewABI at all.

[snip]
> Perhaps the best solution is to
> also wrap the change below in an "if (SGI_COMPAT(abfd))" ?  Any hints
> for a better solution?

The solution is to add n32 support to elf32-mips.c. :-)


Thiemo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]