[ARC] Fixed TLS for IE model.
authorCupertino Miranda <cmiranda@synopsys.com>
Thu, 29 Dec 2016 16:10:01 +0000 (17:10 +0100)
committerCupertino Miranda <cmiranda@synopsys.com>
Thu, 8 Jun 2017 17:00:36 +0000 (19:00 +0200)
commita0abe74332bd25aeb68acfadd74280c0f117c493
tree2128997f00605dde87150541393c9df49932aae4
parentf4e6805f98d2b3eae305f66ba26ab25aae1485f2
[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
bfd/ChangeLog
bfd/arc-got.h
bfd/elf32-arc.c
ld/ChangeLog
ld/testsuite/ld-arc/tls_ie-01.d
This page took 0.024356 seconds and 4 git commands to generate.