summaryrefslogtreecommitdiffstats
path: root/clang/lib/Tooling/Syntax/Tokens.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-05-20 11:47:31 +0000
committerFangrui Song <maskray@google.com>2019-05-20 11:47:31 +0000
commit2109572464da69eb96eda27a0fe5735da1405a9c (patch)
treefa8489b9638356c6f116358e18d6e4b8c2ed344c /clang/lib/Tooling/Syntax/Tokens.cpp
parent3b6b2e331fea16b375d12747f3030c6187e86c2c (diff)
downloadbcm5719-llvm-2109572464da69eb96eda27a0fe5735da1405a9c.tar.gz
bcm5719-llvm-2109572464da69eb96eda27a0fe5735da1405a9c.zip
[ELF] Fix getRelocTargetVA formulae of R_TLS and R_NEG_TLS
For R_TLS: 1) Delete Sym.isTls() . The assembler ensures the symbol is STT_TLS. If not (the input is broken), we would crash (dereferencing null Out::TlsPhdr). 2) Change Sym.isUndefWeak() to Sym.isUndefined(), otherwise with --noinhibit-exec we would still evaluate the symbol and crash. 3) Return A if the symbol is undefined. This is PR40570. The case is probably unrealistic but returning A matches R_ABS and the behavior of several dynamic loaders. R_NEG_TLS is obsoleted Sun TLS we don't fully support, but R_RELAX_TLS_GD_TO_LE_NEG is still used by GD->LE relaxation (subl $var@tpoff,%eax). They should add the addend. Unfortunately I can't test it as compilers don't seem to generate non-zero implicit addends. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D62098 llvm-svn: 361146
Diffstat (limited to 'clang/lib/Tooling/Syntax/Tokens.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud