hanchenye-llvm-project/llvm/test
Reid Kleckner 01660a3d2a [asan] Make ASan compatible with linker dead stripping on Windows
Summary:
This is similar to what was done for Darwin in rL264645 /
http://reviews.llvm.org/D16737, but it uses COFF COMDATs to achive the
same result instead of relying on new custom linker features.

As on MachO, this creates one metadata global per instrumented global.
The metadata global is placed in the custom .ASAN$GL section, which the
ASan runtime will iterate over during initialization. There are no other
references to the metadata, so normal linker dead stripping would
discard it. However, the metadata is put in a COMDAT group with the
instrumented global, so that it will be discarded if and only if the
instrumented global is discarded.

I didn't update the ASan ABI version check since this doesn't affect
non-Windows platforms, and the WinASan ABI isn't really stable yet.

Implementing this for ELF will require extending LLVM IR and MC a bit so
that we can use non-COMDAT section groups.

Reviewers: pcc, kcc, mehdi_amini, kubabrecka

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D26770

llvm-svn: 287576
2016-11-21 20:40:37 +00:00
..
Analysis Fix known zero bits for addrspacecast. 2016-11-21 15:42:31 +00:00
Assembler IR: Introduce inrange attribute on getelementptr indices. 2016-11-10 22:34:55 +00:00
Bindings [C API] Prevent nullptr dereferences in C API for counting attributes. 2016-11-15 22:19:59 +00:00
Bitcode Bitcode: Introduce initial multi-module reader API. 2016-11-16 21:44:45 +00:00
BugPoint Add -strip-nonlinetable-debuginfo capability 2016-10-25 18:44:13 +00:00
CodeGen [mips] Add tests for half precision floating point support. 2016-11-21 20:34:10 +00:00
DebugInfo [AsmPrinter] Enable codeview for windows-itanium 2016-11-21 20:13:32 +00:00
Examples
ExecutionEngine Make this test Windows-only (try to placate buildbots). 2016-11-03 16:43:10 +00:00
Feature
FileCheck
Instrumentation [asan] Make ASan compatible with linker dead stripping on Windows 2016-11-21 20:40:37 +00:00
Integer
JitListener
LTO Fix test from r287353: don't use /dev/null 2016-11-18 18:27:31 +00:00
LibDriver
Linker Linker: Remove unnecessary call to copyMetadata in IRLinker::linkGlobalVariable. 2016-11-14 23:18:38 +00:00
MC [mips] seq macro support 2016-11-21 20:30:41 +00:00
Object [ELF] Convert ELF.h to Expected<T>. 2016-11-16 05:10:28 +00:00
ObjectYAML
Other Statistic/Timer: Include timers in PrintStatisticsJSON(). 2016-11-18 19:43:24 +00:00
SymbolRewriter
TableGen TableGen: Add operator !or 2016-11-15 06:49:28 +00:00
ThinLTO/X86 [ThinLTO] Fix crash when importing an opaque type 2016-11-19 18:44:16 +00:00
Transforms [MemorySSA] Fix unit tests broken by D26704 2016-11-21 20:39:08 +00:00
Unit
Verifier Verifier: Reject any unknown named MD nodes in the llvm.dbg namespace. 2016-10-05 22:15:37 +00:00
YAMLParser
tools [llvm-cov] Avoid 0% when reporting something that's 0/0 2016-11-21 14:00:04 +00:00
.clang-format
CMakeLists.txt [OCaml] Clear cross-target test deps when building out-of-tree 2016-11-12 14:58:30 +00:00
TestRunner.sh
lit.cfg test: synchronise lit substitutions 2016-11-13 19:37:00 +00:00
lit.site.cfg.in