summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/MathExtras.cpp
diff options
context:
space:
mode:
authorMarcin Koscielnicki <koriakin@0x04.net>2016-06-21 07:09:36 +0000
committerMarcin Koscielnicki <koriakin@0x04.net>2016-06-21 07:09:36 +0000
commit613c252517bbb63e92e7580410d002f81ca818e7 (patch)
treec9ee6c10516bbf00a7167c658a3173ba3106571a /llvm/lib/Support/MathExtras.cpp
parent879b0978f4433864c4057e452856d0359454c474 (diff)
downloadbcm5719-llvm-613c252517bbb63e92e7580410d002f81ca818e7.tar.gz
bcm5719-llvm-613c252517bbb63e92e7580410d002f81ca818e7.zip
[sanitizers] [PowerPC] Intercept __tls_get_addr_opt.
On PowerPC, if binutils and glibc are new enough, the linker uses an optimized code sequence to implement __tls_get_addr call stub, which will end up calling __tls_get_addr_opt instead of __tls_get_addr. Thus, we need to intercept it in addition to __tls_get_addr. This symbol is actually an alias of __tls_get_addr - its only purpose is that its presence in glibc triggers the optimization in linker. This means we can make our own intercepting symbol an alias as well. This patch will make the linker attempt optimization even on older glibc's (since it sees a defined __tls_get_addr_opt symbol in msan) - however, this is only a very minor performance problem (the linker generated code will never recognize a filled static TLS descriptor, always burning a few cycles), not a correctness problem. This fixes MSan's dtls_test.c, allowing us to finally enable MSan on PowerPC64. llvm-svn: 273250
Diffstat (limited to 'llvm/lib/Support/MathExtras.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud