bfd/
authorRichard Sandiford <rdsandiford@googlemail.com>
Thu, 31 May 2007 20:22:56 +0000 (20:22 +0000)
committerRichard Sandiford <rdsandiford@googlemail.com>
Thu, 31 May 2007 20:22:56 +0000 (20:22 +0000)
* elfxx-mips.c (mips_elf_initialize_tls_index): When processing a
type (3) single-GOT entry, read tls_type from the hash table entry
rather than the GOT entry.

bfd/ChangeLog
bfd/elfxx-mips.c

index e291ff153aee7d4fa464f59e0dae6f6c69f9d6bc..06b152b5043d80a1bd9d05403d00053d72254766 100644 (file)
@@ -1,3 +1,9 @@
+2007-05-31  Richard Sandiford  <rsandifo@nildram.co.uk>
+
+       * elfxx-mips.c (mips_elf_initialize_tls_index): When processing a
+       type (3) single-GOT entry, read tls_type from the hash table entry
+       rather than the GOT entry.
+
 2007-06-01  Alan Modra  <amodra@bigpond.net.au>
 
        * simple.c (bfd_simple_get_relocated_section_contents): Init
index e4ddb37cd42e381ef2140342cbd3316513700752..1bccb331de937eb8f59027da37c9e101dfe1d357 100644 (file)
@@ -3186,6 +3186,7 @@ mips_elf_initialize_tls_index (void **entryp, void *p)
   struct mips_got_entry *entry = (struct mips_got_entry *)*entryp;
   struct mips_got_info *g = p;
   bfd_vma next_index;
+  unsigned char tls_type;
 
   /* We're only interested in TLS symbols.  */
   if (entry->tls_type == 0)
@@ -3201,6 +3202,7 @@ mips_elf_initialize_tls_index (void **entryp, void *p)
        return 1;
       entry->d.h->tls_type |= GOT_TLS_OFFSET_DONE;
       entry->d.h->tls_got_offset = next_index;
+      tls_type = entry->d.h->tls_type;
     }
   else
     {
@@ -3217,12 +3219,13 @@ mips_elf_initialize_tls_index (void **entryp, void *p)
          g->tls_ldm_offset = next_index;
        }
       entry->gotidx = next_index;
+      tls_type = entry->tls_type;
     }
 
   /* Account for the entries we've just allocated.  */
-  if (entry->tls_type & (GOT_TLS_GD | GOT_TLS_LDM))
+  if (tls_type & (GOT_TLS_GD | GOT_TLS_LDM))
     g->tls_assigned_gotno += 2;
-  if (entry->tls_type & GOT_TLS_IE)
+  if (tls_type & GOT_TLS_IE)
     g->tls_assigned_gotno += 1;
 
   return 1;
This page took 0.049765 seconds and 4 git commands to generate.