]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_DTPREL>:
authorHans-Peter Nilsson <hp@axis.com>
Mon, 19 Oct 2009 16:35:19 +0000 (16:35 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Mon, 19 Oct 2009 16:35:19 +0000 (16:35 +0000)
Don't subtract the size of the TLS block for non-shared objects
from the relocation.

bfd/ChangeLog
bfd/elf32-cris.c

index 178d2ca34642077eb044623c80828fc221dada11..5459aa6bb28a403fa0bd4936b1c3beaf031e3089 100644 (file)
@@ -1,3 +1,9 @@
+2009-10-19  Hans-Peter Nilsson  <hp@axis.com>
+
+       * 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.
+
 2009-10-16  Tristan Gingold  <gingold@adacore.com>
 
        * configure.in: Bump version to 2.20.0
index 2037b10f59ec6f82e628fe3c09532fcc45cb3f76..ceea1b92736ff4972816242a911b018ce3bd75f7 100644 (file)
@@ -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: