* elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
authorJakub Jelinek <jakub@redhat.com>
Wed, 31 Jul 2002 15:04:06 +0000 (15:04 +0000)
committerJakub Jelinek <jakub@redhat.com>
Wed, 31 Jul 2002 15:04:06 +0000 (15:04 +0000)
if _bfd_elf_link_hash_copy_indirect will swap got.refcount.

bfd/ChangeLog
bfd/elf32-i386.c

index 7772a0637c1936c8fb90786a6ee066ebcd78220e..9052b644ea8876384624fe4fb6aab902adf49909 100644 (file)
@@ -1,3 +1,8 @@
+2002-07-31  Jakub Jelinek  <jakub@redhat.com>
+
+       * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
+       if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
+
 2002-07-31  Ian Dall  <ian@sibyl.beware.dropbear.id.au>
 
        * aoutx.h (aout_link_check_ar_symbols): Whether to include an
index 7f26fabb3689857bbcff4c74fc6e0728e2b9390f..997bf3722703ddcc3e19e789f942963542a7154b 100644 (file)
@@ -809,6 +809,12 @@ elf_i386_copy_indirect_symbol (dir, ind)
       eind->dyn_relocs = NULL;
     }
 
+  if (ind->root.type == bfd_link_hash_indirect
+      && dir->got.refcount <= 0)
+    {
+      edir->tls_type = eind->tls_type;
+      eind->tls_type = GOT_UNKNOWN;
+    }
   _bfd_elf_link_hash_copy_indirect (dir, ind);
 }