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: Preserve PLT flag in copy_indirect


On Wed, Nov 12, 2003 at 01:24:06PM -0500, Daniel Jacobowitz wrote:
> Alan, you said this patch was "possibly" right.  I dropped it because
> the only time it was causing me a problem was on dodgily untyped
> functions.  I just ran into it again on MIPS - losing the
> ELF_LINK_HASH_NEEDS_PLT flag caused us to not emit a lazy-resolution
> stub.  So is this patch OK?
> 
> > 2003-08-18  Daniel Jacobowitz  <drow@mvista.com>
> > 
> > 	* elf.c (_bfd_elf_link_hash_copy_indirect): Preserve
> > 	ELF_LINK_HASH_NEEDS_PLT.

Yes, I think the patch is OK, except that I'd fix the formatting of the
lines above and write:

  dir->elf_link_hash_flags
    |= ind->elf_link_hash_flags & (ELF_LINK_HASH_REF_DYNAMIC
				   | ELF_LINK_HASH_REF_REGULAR
				   | ELF_LINK_HASH_REF_REGULAR_NONWEAK
				   | ELF_LINK_NON_GOT_REF
				   | ELF_LINK_HASH_NEEDS_PLT);

Also, what about all the backend copy_indirect functions?  I think the
patch should also adjust them for consistency.  You may even fix a few
problems, eg. in elfxx-ia64.c, I see
      /* ??? Versioned symbols seem to lose ELF_LINK_HASH_NEEDS_PLT.  */

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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