This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH] Fix IA-32 TLS handling with symbol versioning
- From: Jakub Jelinek <jakub at redhat dot com>
- To: binutils at sources dot redhat dot com
- Cc: drow at mvista dot com
- Date: Tue, 30 Jul 2002 20:30:28 +0200
- Subject: [PATCH] Fix IA-32 TLS handling with symbol versioning
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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