mips4/32-el BFD breakage
Daniel Jacobowitz
drow@mvista.com
Mon Mar 7 16:30:00 GMT 2005
On Mon, Mar 07, 2005 at 05:22:23PM +0100, Pjotr Kourzanov wrote:
> Dear binutils developers,
>
> Having dug into a particularly nasty problem of crashing applications
> that use huge shared libraries (>40000 symbols) under a MIPS4,
> little-endian target (I think the problem is MIPS generic, so it affects
> MIPS3 as well) with Linux 2.4 kernel and GLIBC 2.3.2, I came up with the
> attached two patches (one for 2.15, another one for the CVS MAIN).
>
> It seems that a change to BFD broke GLIBC's dynamic loader, which
> just gets a SIGSEGV whenever an application tries to link to huge shared
> libraries in _dl_map_object_deps.
>
> I have traced the problem to this change:
>
> 2003-11-17 Daniel Jacobowitz <drow@mvista.com>
>
>
>
> * elf.c (_bfd_elf_link_hash_copy_indirect): Copy
>
> ELF_LINK_HASH_NEEDS_PLT.
>
> It apparently introduces ELF_LINK_HASH_NEEDS_PLT handling in
> _bfd_elf_link_hash_copy_indirect which is bogus on (at least) my MIPS
> with huge shared objects.
>
> As a workaround, I've reverted this particular change by copying the
> _bfd_elf_link_hash_copy_indirect implementation from elf.c to
> elfxx-mips.c (suffixing it with "_mips") and disabling copying of the
> ELF_LINK_HASH_NEEDS_PLT flag.
>
> As I am not a MIPS binutils expert, could one of you shed light on why
> this change was required?
Your patch is definitely incorrect. If the indirect symbol needs a PLT
entry, then the defined symbol will need a PLT entry also.
You've attached a patch against HEAD; however, did you verify that the
actual problem occured on HEAD? Some multi-GOT bugs have been fixed
since binutils 2.15. Also, can you explain why you made this
particular change and what affect it had on your binary?
--
Daniel Jacobowitz
CodeSourcery, LLC
More information about the Binutils
mailing list