diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2007-05-31 20:22:56 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2007-05-31 20:22:56 +0000 |
commit | cbf2cba4be7145d8bf33647bda72f7167b8fc32d (patch) | |
tree | 97651292e0880b48ae821b4376c886bcd8de9a25 /bfd | |
parent | f57d151a994d668d681871f04cfd6e32a1c5ac33 (diff) | |
download | gdb-cbf2cba4be7145d8bf33647bda72f7167b8fc32d.zip gdb-cbf2cba4be7145d8bf33647bda72f7167b8fc32d.tar.gz gdb-cbf2cba4be7145d8bf33647bda72f7167b8fc32d.tar.bz2 |
bfd/
* 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.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elfxx-mips.c | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index e291ff1..06b152b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -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 diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index e4ddb37..1bccb33 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -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; |