PATCH: PR 1025: binutils failed to build gcc 4.0.1 20050619
Alan Modra
amodra@bigpond.net.au
Thu Jun 23 01:56:00 GMT 2005
On Mon, Jun 20, 2005 at 11:15:33AM -0700, H. J. Lu wrote:
> PR 1025
> * elf-m10300.c (mn10300_elf_check_relocs): Handle indirect
> symbol.
[snip]
> --- bfd/elf-m10300.c.got 2005-05-07 06:58:08.000000000 -0700
> +++ bfd/elf-m10300.c 2005-06-20 10:55:33.000000000 -0700
> @@ -717,7 +717,12 @@ mn10300_elf_check_relocs (abfd, info, se
> if (r_symndx < symtab_hdr->sh_info)
> h = NULL;
> else
> - h = sym_hashes[r_symndx - symtab_hdr->sh_info];
> + {
> + h = sym_hashes[r_symndx - symtab_hdr->sh_info];
> + while (h->root.type == bfd_link_hash_indirect
> + || h->root.type == bfd_link_hash_warning)
> + h = (struct elf_link_hash_entry *) h->root.u.i.link;
> + }
>
> /* Some relocs require a global offset table. */
> if (dynobj == NULL)
[snip]
Can you do the indirect sym lookup in elf_link_add_object_symbols
instead? Seems like elf_link_add_object_symbols already tries to do
this, but I guess doesn't get it right in all cases.
--
Alan Modra
IBM OzLabs - Linux Technology Centre
More information about the Binutils
mailing list