aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorCupertino Miranda <cmiranda@synopsys.com>2016-12-29 17:10:01 +0100
committerCupertino Miranda <cmiranda@synopsys.com>2017-06-08 19:00:36 +0200
commita0abe74332bd25aeb68acfadd74280c0f117c493 (patch)
tree2128997f00605dde87150541393c9df49932aae4 /ld
parentf4e6805f98d2b3eae305f66ba26ab25aae1485f2 (diff)
downloadgdb-a0abe74332bd25aeb68acfadd74280c0f117c493.zip
gdb-a0abe74332bd25aeb68acfadd74280c0f117c493.tar.gz
gdb-a0abe74332bd25aeb68acfadd74280c0f117c493.tar.bz2
[ARC] Fixed TLS for IE model.
In the case of static relocation, the GOT entries are fixed at link time and are set by the linker. In order to compute the right TLS offset it is necessary to add TCB_SIZE to the offset, just in case the dynamic linker is not expected to be executed (static linked case). This problem does appear in dynamic linked applications, as the dynamic linker is adding this TCB_SIZE by operating the TCB block structure. Problem revealed in GLIBC with static linking. bfd/ChangeLog: Cupertino Miranda <cmiranda@synopsys.com> arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to patched section contents for TLS IE reloc. elf32-arc.c: Remove TCB_SIZE preprocessor macro. Rebase to 0006
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog4
-rw-r--r--ld/testsuite/ld-arc/tls_ie-01.d4
2 files changed, 6 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 9dd4256..2cbe09d 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,7 @@
+2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
+
+ * testsuite/ld-arc/tls_ie-01.d: Changed expected result.
+
2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
* testsuite/ld-ifunc/ifunc-1-local-x86.d: Pass
diff --git a/ld/testsuite/ld-arc/tls_ie-01.d b/ld/testsuite/ld-arc/tls_ie-01.d
index 304973c..62b3932 100644
--- a/ld/testsuite/ld-arc/tls_ie-01.d
+++ b/ld/testsuite/ld-arc/tls_ie-01.d
@@ -1,10 +1,10 @@
#source: tls_ie-01.s
#as: -mcpu=arc700
-#ld:
+#ld: -static
#objdump: -s -j .got
#xfail: arc*-*-elf*
[^:]+: file format elf32-littlearc
Contents of section \.got:
- [0-9a-f]+ 00000000 04000000 .+
+ [0-9a-f]+ 08000000 0c000000 +.+