diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2009-01-27 07:06:36 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@axis.com> | 2009-01-27 07:06:36 +0000 |
commit | f551b6f0cec18b7c84533d3fa9c09458d05f28d4 (patch) | |
tree | 8186125294e417b84409e793646e4ba7602d9603 /bfd/elf32-cris.c | |
parent | 026f603876170963e15019c6b3c42da334bd4c30 (diff) | |
download | gdb-f551b6f0cec18b7c84533d3fa9c09458d05f28d4.zip gdb-f551b6f0cec18b7c84533d3fa9c09458d05f28d4.tar.gz gdb-f551b6f0cec18b7c84533d3fa9c09458d05f28d4.tar.bz2 |
* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
<R_CRIS_32_DTPREL>: Correct relocation value.
Diffstat (limited to 'bfd/elf32-cris.c')
-rw-r--r-- | bfd/elf32-cris.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c index 6b71ee4..16b0b45 100644 --- a/bfd/elf32-cris.c +++ b/bfd/elf32-cris.c @@ -1687,9 +1687,14 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section, } /* The thread-based offset to the local symbol is the - relocation. */ + relocation. + For the executable, TLS data begins at the thread pointer plus + the negative size of the TLS data. For a DSO, that's part of + the module TLS offset. */ relocation -= elf_hash_table (info)->tls_sec == NULL - ? 0 : elf_hash_table (info)->tls_sec->vma; + ? 0 : (elf_hash_table (info)->tls_sec->vma + + (info->shared + ? 0 : elf_hash_table (info)->tls_sec->size)); break; case R_CRIS_32_GD: |