aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
diff options
context:
space:
mode:
authorKuba Brecka <kuba.brecka@gmail.com>2016-10-31 18:51:58 +0000
committerKuba Brecka <kuba.brecka@gmail.com>2016-10-31 18:51:58 +0000
commita28c9e8f09c9d86cab16a1a97f0f09179a2c18ce (patch)
tree61b493056514209e137048dbf5fd197dc5a68aa5 /llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
parente7b54c2ea5540f456fa77423a53902ed212b0994 (diff)
downloadllvm-a28c9e8f09c9d86cab16a1a97f0f09179a2c18ce.zip
llvm-a28c9e8f09c9d86cab16a1a97f0f09179a2c18ce.tar.gz
llvm-a28c9e8f09c9d86cab16a1a97f0f09179a2c18ce.tar.bz2
[asan] Move instrumented null-terminated strings to a special section, LLVM part
On Darwin, simple C null-terminated constant strings normally end up in the __TEXT,__cstring section of the resulting Mach-O binary. When instrumented with ASan, these strings are transformed in a way that they cannot be in __cstring (the linker unifies the content of this section and strips extra NUL bytes, which would break instrumentation), and are put into a generic __const section. This breaks some of the tools that we have: Some tools need to scan all C null-terminated strings in Mach-O binaries, and scanning all the contents of __const has a large performance penalty. This patch instead introduces a special section, __asan_cstring which will now hold the instrumented null-terminated strings. Differential Revision: https://reviews.llvm.org/D25026 llvm-svn: 285619
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp')
0 files changed, 0 insertions, 0 deletions