[ELF][MIPS] Emit dynamic relocations for PIC non-preemptible static TLS
authorJessica Clarke <jrtc27@jrtc27.com>
Tue, 27 Apr 2021 18:03:57 +0000 (19:03 +0100)
committerJessica Clarke <jrtc27@jrtc27.com>
Tue, 27 Apr 2021 18:04:50 +0000 (19:04 +0100)
commit7fefd032cb260f96191089c9d817c61276d8bf66
treee61c00f3ee116f5e54aea1c8e9e3f3139fcbe746
parent1d505016efa29ce1e9b11baf8ab2d7950e9bdcc7
[ELF][MIPS] Emit dynamic relocations for PIC non-preemptible static TLS

This is the same problem as 127176e59eb9, but for static TLS rather than
dynamic TLS. Although we know the symbol will be the one in our own TLS
segment, and thus the offset of it within that, we don't know where in
the static TLS block our data will be allocated and thus we must emit a
dynamic relocation for this case.

Reviewed By: MaskRay, atanasyan

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