This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Ping Re: Patch for MIPS multi-got bug with forced-local symbols
* Daniel Jacobowitz <drow@false.org> [2007-10-12 11:59]:
> > FWIW, it looks good to me. I think the second solution is indeed how
> > things are supposed to work at the moment, and if we're going to change
> > the datastructures, a bigger overhaul than the first option might be
> > useful...
> Thanks. Here's what I have checked in.
This fixes PR 4988. Can you put this into 2.18?
> --
> Daniel Jacobowitz
> CodeSourcery
>
> 2007-10-12 Daniel Jacobowitz <dan@codesourcery.com>
>
> * elfxx-mips.c (mips_elf_sort_hash_table_f): Handle forced
> local symbols specially.
> (mips_elf_set_global_got_offset): Skip forced local symbols.
>
> --- elfxx-mips.c.pre 2007-10-08 05:44:21.000000000 -0700
> +++ elfxx-mips.c 2007-10-08 06:20:14.000000000 -0700
> @@ -2842,7 +2842,8 @@ mips_elf_sort_hash_table_f (struct mips_
> /* Global symbols that need GOT entries that are not explicitly
> referenced are marked with got offset 2. Those that are
> referenced get a 1, and those that don't need GOT entries get
> - -1. */
> + -1. Forced local symbols may also be marked with got offset 1,
> + but are never given global GOT entries. */
> if (h->root.got.offset == 2)
> {
> BFD_ASSERT (h->tls_type == GOT_NORMAL);
> @@ -2851,7 +2852,7 @@ mips_elf_sort_hash_table_f (struct mips_
> hsd->low = (struct elf_link_hash_entry *) h;
> h->root.dynindx = hsd->max_unref_got_dynindx++;
> }
> - else if (h->root.got.offset != 1)
> + else if (h->root.got.offset != 1 || h->forced_local)
> h->root.dynindx = hsd->max_non_got_dynindx++;
> else
> {
> @@ -3459,6 +3460,7 @@ mips_elf_set_global_got_offset (void **e
>
> if (entry->abfd != NULL && entry->symndx == -1
> && entry->d.h->root.dynindx != -1
> + && !entry->d.h->forced_local
> && entry->d.h->tls_type == GOT_NORMAL)
> {
> if (g)
--
Martin Michlmayr
http://www.cyrius.com/