This is the mail archive of the binutils@sourceware.org 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: Fix MIPS multi-GOT -Bsymbolic link failure


On Thu, Aug 26, 2010 at 10:58:20PM +0100, Richard Sandiford wrote:
> > _bfd_mips_elf_finish_dynamic_symbol iterates over global GOT entries,
> > and ends up calling mips_elf_create_dynamic_relocation with a NULL sec
> > value, while the code in mips_elf_create_dynamic_relocation checks
> > SYMBOL_REFERENCES_LOCAL and on that basis reaches code requiring a
> > non-NULL sec.  In turn the link fails with "final link failed: Bad
> > value".  This patch arranges for NULL sec to go through the global
> > rather than the local case.
> 
> I'm not sure this will correctly preserve the -Bsymbolic semantics.
> We really don't want the relocation to be against a global symbol,
> since the ABI requires any global symbols involved in relocations
> to have a global GOT entry, which in turn means we'll end up using
> the usual -Bdynamic value of the symbol.

That should work out fine.  Yes, we'll get a global symbol in the
relocation - but the library will have DT_SYMBOLIC or DF_SYMBOLIC set,
and so the library's view of the symbol will resolve locally.

-- 
Daniel Jacobowitz
CodeSourcery


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