This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Preserve PLT flag in copy_indirect
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Mon, 17 Nov 2003 19:42:18 +1030
- Subject: Re: Preserve PLT flag in copy_indirect
- References: <20030819020542.GA31092@nevyn.them.org> <20031112182406.GA14961@nevyn.them.org>
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