This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: PR 1025: binutils failed to build gcc 4.0.1 20050619
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: binutils at sources dot redhat dot com
- Date: Thu, 23 Jun 2005 11:26:49 +0930
- Subject: Re: PATCH: PR 1025: binutils failed to build gcc 4.0.1 20050619
- References: <20050620181533.GA30764@lucon.org>
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