[ARM] ARM TLS shouldn't use relaxations
authorPeter Smith <peter.smith@linaro.org>
Fri, 23 Sep 2016 13:54:48 +0000 (13:54 +0000)
committerPeter Smith <peter.smith@linaro.org>
Fri, 23 Sep 2016 13:54:48 +0000 (13:54 +0000)
commitfde6213fe83384fb8ec8c7e1bfb0d7a836964578
tree3aa26c11fd9e94e394df22f349478cabb8bf1a8d
parent85124c76fc5407e43c73466f6950dbee8766d4c2
[ARM] ARM TLS shouldn't use relaxations

The ARM TLS relocations are placed on literal data and not the
code-sequence, it is therefore not possible to implement the relaxTls*
functions. This change updates handleMipsTlsRelocation() to
handleNoRelaxTlsRelocation() and incorporates ARM as well as Mips.

The ARM support in handleNoRelaxTlsRelocation() currently needs to ouput
the module index dynamic relocation in all cases as it is relying on the
dynamic linker to set the module index in the got.

Should address PR30218

Differential Revision: https://reviews.llvm.org/D24827

llvm-svn: 282250
lld/ELF/Relocations.cpp
lld/test/ELF/Inputs/arm-tls-get-addr.s [new file with mode: 0644]
lld/test/ELF/arm-tls-norelax-gd-ie.s [new file with mode: 0644]
lld/test/ELF/arm-tls-norelax-gd-le.s [new file with mode: 0644]
lld/test/ELF/arm-tls-norelax-ie-le.s [new file with mode: 0644]
lld/test/ELF/arm-tls-norelax-ld-le.s [new file with mode: 0644]