From 4005427f8676ad78c88b430fa25e1d179207cbf4 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Sat, 4 Feb 2006 08:29:58 +0000 Subject: bfd/ * elfxx-mips.c (mips_elf_initialize_tls_index): If a TLS symbol has already been assigned a GOT index, copy that index to the current hash table entry. ld/testsuite/ * ld-mips-elf/tls-hidden2a.s, ld-mips-elf/tls-hidden2b.s, * ld/testsuite/ld-mips-elf/tls-hidden2.d, * ld/testsuite/ld-mips-elf/tls-hidden2-got.d: New test. * ld-mips-elf/mips-elf.exp: Run it. --- bfd/elfxx-mips.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bfd/elfxx-mips.c') diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index 99a0def..2675ee08 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -2994,7 +2994,10 @@ mips_elf_initialize_tls_index (void **entryp, void *p) if (g->next == NULL) { if (entry->d.h->tls_type & GOT_TLS_OFFSET_DONE) - return 1; + { + entry->gotidx = entry->d.h->tls_got_offset; + return 1; + } entry->d.h->tls_type |= GOT_TLS_OFFSET_DONE; } } -- cgit v1.1