Ping Re: Patch for MIPS multi-got bug with forced-local symbols

Daniel Jacobowitz drow@false.org
Fri Oct 12 16:06:00 GMT 2007


On Tue, Oct 09, 2007 at 09:35:09PM +0100, Richard Sandiford wrote:
> 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.

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



More information about the Binutils mailing list