This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: ld/2218: Weak undefined symbol doesn't work properly with PIE
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.
--
Jim Wilson, GNU Tools Support, http://www.specifix.com