For the Local Dynamic case of TLSDESC, _TLS_MODULE_BASE_ is defined as a
special TLS symbol that makes:
- With LD->LE relaxation: _TLS_MODULE_BASE_@tpoff = 0 (lowest address in
the TLS block).
- Without relaxation: it produces a dynamic TLSDESC relocation that
computes 0.
A Local Dynamic symbol can be accessed by adding an offset to tpoff (LE)
or dtpoff (LD) of _TLS_MODULE_BASE_. For the Local Dynamic case, this
saves GOT slots as otherwise we would create a dynamic TLSDESC
relocation and reserve two GOT slots for each symbol.
Add ElfSym::TlsModuleBase and change the signature of getTlsTpOffset()
to special case _TLS_MODULE_BASE_.
I searched for _TLS_MODULE_BASE_ in LLVM code and found it is mentioned, but only for AARCH64.
Should it be created for this target too?