diff options
author | Fangrui Song <maskray@google.com> | 2019-05-30 10:00:20 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-05-30 10:00:20 +0000 |
commit | 0526c0cd8e73317ddef71b81b78631b16f4e9cd0 (patch) | |
tree | 5917968d4b095704674af6abb731d0a1a8378fe5 /clang/lib | |
parent | 3475a46ec23d170d086e98a470f3a3f5492845bd (diff) | |
download | bcm5719-llvm-0526c0cd8e73317ddef71b81b78631b16f4e9cd0.tar.gz bcm5719-llvm-0526c0cd8e73317ddef71b81b78631b16f4e9cd0.zip |
[ELF] Implement Local Dynamic style TLSDESC for x86-64
For the Local Dynamic case of TLSDESC, _TLS_MODULE_BASE_ is defined as a
special TLS symbol that makes:
1) Without relaxation: it produces a dynamic TLSDESC relocation that
computes 0. Adding @dtpoff to access a TLS symbol.
2) With LD->LE relaxation: _TLS_MODULE_BASE_@tpoff = 0 (lowest address in
the TLS block). Adding @tpoff to access a TLS symbol.
For 1), this saves dynamic relocations and GOT slots as otherwise
(General Dynamic) we would create an R_X86_64_TLSDESC and reserve two
GOT slots for each symbol.
Add ElfSym::TlsModuleBase and change the signature of getTlsTpOffset()
to special case _TLS_MODULE_BASE_.
Reviewed By: ruiu
Differential Revision: https://reviews.llvm.org/D62577
llvm-svn: 362078
Diffstat (limited to 'clang/lib')
0 files changed, 0 insertions, 0 deletions