[ELF][MIPS] Don't emit dynamic relocations for PIE non-preemptible TLS
authorJessica Clarke <jrtc27@jrtc27.com>
Tue, 27 Apr 2021 17:57:47 +0000 (18:57 +0100)
committerJessica Clarke <jrtc27@jrtc27.com>
Tue, 27 Apr 2021 18:04:50 +0000 (19:04 +0100)
commit1d505016efa29ce1e9b11baf8ab2d7950e9bdcc7
treefff8776a396d43f4df4e647117654c2e425d3184
parent6a2e29851738d33d2296a9684016ebaf7247ae54
[ELF][MIPS] Don't emit dynamic relocations for PIE non-preemptible TLS

Whilst not wrong (unless using static PIE where the relocations are
likely not implemented by the runtime), this is inefficient, as the TLS
module indices and offsets are independent of the executable's load
address.

Reviewed By: MaskRay, atanasyan

Differential Revision: https://reviews.llvm.org/D101382
lld/ELF/SyntheticSections.cpp
lld/test/ELF/mips-tls-64.s
lld/test/ELF/mips-tls.s