[PATCH] Fix IA-32 TLS handling with symbol versioning
Jakub Jelinek
jakub@redhat.com
Tue Jul 30 11:39:00 GMT 2002
Hi!
If _bfd_elf_link_hash_copy_indirect is swapping h->got.offset values,
tls_type needs to match that, otherwise the backend gets confused with
GOT_UNKNOWN values where it is not expecting them.
2002-07-30 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.
--- bfd/elf32-i386.c.jj 2002-07-30 16:14:55.000000000 +0200
+++ bfd/elf32-i386.c 2002-07-30 18:06:40.000000000 +0200
@@ -809,6 +809,14 @@ elf_i386_copy_indirect_symbol (dir, ind)
eind->dyn_relocs = NULL;
}
+ if (ind->root.type == bfd_link_hash_indirect
+ && dir->got.refcount <= 0)
+ {
+ int type = edir->tls_type;
+
+ edir->tls_type = eind->tls_type;
+ eind->tls_type = type;
+ }
_bfd_elf_link_hash_copy_indirect (dir, ind);
}
Jakub
More information about the Binutils
mailing list