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: PATCH: ld/2218: Weak undefined symbol doesn't work properly with PIE


On Thu, Feb 23, 2006 at 05:39:22PM -0800, James E Wilson wrote:
> On Mon, 2006-02-20 at 18:57, H. J. Lu wrote:
> > Due to the complexity of ia64 backend, it is better to handle weak
> > undefined symbol in _bfd_elf_fix_symbol_flags for ia64.
> 
> I don't have enough bfd linker experience to understand all of the
> subtleties here, but this does look like a reasonably elegant solution. 
> The elfxx-ia64.c file does handle dynamic relocs differently than the
> other ports that Alan fixed, and it isn't obvious to me how the same fix
> can be made here.  I note that the elfxx-ia64.c file has no existing
> calls to bfd_elf_link_record_dynamic_symbol, unlike the files that Alan
> fixed.  So putting the new call in elflink.c looks like the right thing
> to do.
> 
> I also note that the elfxx-ia64.c file is using
> bfd_elf_link_record_local_dynamic_symbol, and the elf64-hppa.c file does
> also.  The two files seem to have similar handling for dynamic relocs. 
> Alan did not fix the elf64-hppa.c file either.  So it looks like the
> 64-bit hppa port needs the same fix as the ia64 port, thus justifying
> having a common hook in the elflink.c file that can be used by both.
> 
> So the patch looks OK to me, though it leaves open the question of who
> fixes the elf64-hppa.c file.

I was a little concerned that HJ's patch might make symbols dynamic
unnecessarily, as previous iterations did.  However, the latest patch
does look reasonable, and I can't think of any situation where it would
do the wrong thing except with contrived assembly.

-- 
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]