llvm-project/llvm/lib/Transforms/Instrumentation
Kuba Brecka a28c9e8f09 [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
2016-10-31 18:51:58 +00:00
..
AddressSanitizer.cpp [asan] Move instrumented null-terminated strings to a special section, LLVM part 2016-10-31 18:51:58 +00:00
BoundsChecking.cpp Apply clang-tidy's modernize-loop-convert to most of lib/Transforms. 2016-06-26 12:28:59 +00:00
CFGMST.h [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
CMakeLists.txt [PGO] Promote indirect calls to conditional direct calls with value-profile 2016-04-27 23:20:27 +00:00
DataFlowSanitizer.cpp Apply clang-tidy's modernize-loop-convert to most of lib/Transforms. 2016-06-26 12:28:59 +00:00
EfficiencySanitizer.cpp [esan] Remove global variable. 2016-10-18 19:39:23 +00:00
GCOVProfiling.cpp Use StringRef in Pass/PassManager APIs (NFC) 2016-10-01 02:56:57 +00:00
IndirectCallPromotion.cpp Use StringRef in Pass/PassManager APIs (NFC) 2016-10-01 02:56:57 +00:00
InstrProfiling.cpp Utility functions for appending to llvm.used/llvm.compiler.used. 2016-10-25 23:53:31 +00:00
Instrumentation.cpp [PM] code refactoring /NFC 2016-06-05 03:40:03 +00:00
LLVMBuild.txt [PGO] Resubmit "MST based PGO instrumentation infrastructure" (r254021) 2015-12-09 18:08:16 +00:00
MaximumSpanningTree.h
MemorySanitizer.cpp Use StringRef in Pass/PassManager APIs (NFC) 2016-10-01 02:56:57 +00:00
PGOInstrumentation.cpp [PGO] Fix select instruction annotation 2016-10-25 21:47:24 +00:00
SanitizerCoverage.cpp [sanitizer-coverage] use private linkage for coverage guards, delete old commented-out code. 2016-10-11 19:36:50 +00:00
ThreadSanitizer.cpp Use StringRef in Pass/PassManager APIs (NFC) 2016-10-01 02:56:57 +00:00