diff options
author | Ryan Prichard <rprichard@google.com> | 2019-01-15 00:11:37 -0800 |
---|---|---|
committer | Ryan Prichard <rprichard@google.com> | 2019-01-17 00:45:55 -0800 |
commit | fb8730d49586f29868b5697d6a8c74aa9a4847d0 (patch) | |
tree | 2900d8f03068efb6a069eb6b579460855b43627b /libc/malloc_debug/malloc_debug.cpp | |
parent | 1988350d1ccd1a99c628178612e1c9ce0f7858a3 (diff) |
Handle R_GENERIC_TLS_TPREL relocations
This relocation is used for static TLS's initial-exec (IE) accesses.
A TLS symbol's value is its offset from the start of the ELF module's
TLS segment. It doesn't make sense to add the load_bias to this value,
so skip the call to soinfo::resolve_symbol_address.
Allow TLS relocations to refer to an unresolved weak symbol. In that case,
sym will be non-zero, but lsi will be nullptr. The dynamic linker resolves
the TPREL relocation to 0, making &missing_weak_symbol equal the thread
pointer.
Recognize Gold-style relocations to STB_LOCAL TLS symbols/sections and
issue an error.
Remove the "case R_AARCH64_TLS_TPREL64", because the R_GENERIC_TLS_TPREL
case handles it.
Remove the no-op R_AARCH64_TLSDESC handler. It's better to issue an error.
dlopen_library_with_ELF_TLS now fails with a consistent error about an
unimplemented dynamic TLS relocation.
Bug: http://b/78026329
Test: bionic unit tests (elftls tests are added in a later CL)
Change-Id: Ia08e1b5c8098117e12143d3b4ebb4dfaa5ca46ec
Diffstat (limited to 'libc/malloc_debug/malloc_debug.cpp')
0 files changed, 0 insertions, 0 deletions