summaryrefslogtreecommitdiff
path: root/bfd/elf32-cris.c
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2009-10-19 16:33:49 +0000
committerHans-Peter Nilsson <hp@axis.com>2009-10-19 16:33:49 +0000
commit5206cb923248eb977017158fd7f5019e8a2724af (patch)
treedb4dcc3875e8fc3e43f704f46197ce3021f46d47 /bfd/elf32-cris.c
parentce385559dd832a5e4498ee250b4d8afa7188bf92 (diff)
downloadbinutils-redhat-5206cb923248eb977017158fd7f5019e8a2724af.tar.gz
* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_DTPREL>:
Don't subtract the size of the TLS block for non-shared objects from the relocation.
Diffstat (limited to 'bfd/elf32-cris.c')
-rw-r--r--bfd/elf32-cris.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index 2037b10f59..ceea1b9273 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -1690,15 +1690,10 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
= -elf_cris_hash_table (info)->dtpmod_refcount;
}
- /* The thread-based offset to the local symbol is the
- 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. */
+ /* The relocation is the offset from the start of the module
+ TLS block to the (local) symbol. */
relocation -= elf_hash_table (info)->tls_sec == NULL
- ? 0 : (elf_hash_table (info)->tls_sec->vma
- + (info->shared
- ? 0 : elf_hash_table (info)->tls_size));
+ ? 0 : elf_hash_table (info)->tls_sec->vma;
break;
case R_CRIS_32_GD: