diff options
author | Reid Kleckner <rnk@google.com> | 2016-11-17 19:02:53 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2016-11-17 19:02:53 +0000 |
commit | 1ab93d4538f7f20912fc97b9f01259d0e55d54d7 (patch) | |
tree | 7c57fa58dc72df76ad5d37896285a3f373f83a58 /lib/asan/tests | |
parent | bb14ea9c2c7daefe441f6b8568f353cabff05e84 (diff) |
[asan] Create a .ASAN$G(A-Z) section for global registration
Summary:
The expectation is that new instrumented code will add global variable
metadata to the .ASAN$GL section, and we will use this new code to
iterate over it.
This technique seems to break when using incremental linking, which
seems to align every global to a 256 byte boundary. Presumably this is
so that it can incrementally cope with global changing size. Clang
already passes -incremental:no as a linker flag when you invoke it to do
the link step.
The two tests added for this feature will fail until the LLVM
instrumentation change in D26770 lands, so they are marked XFAIL for
now.
Reviewers: pcc, kcc, mehdi_amini, kubabrecka
Subscribers: llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D26771
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@287246 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/tests')
-rw-r--r-- | lib/asan/tests/CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/asan/tests/CMakeLists.txt b/lib/asan/tests/CMakeLists.txt index 3e56763a8..c45d35b55 100644 --- a/lib/asan/tests/CMakeLists.txt +++ b/lib/asan/tests/CMakeLists.txt @@ -47,6 +47,8 @@ else() endif() if(MSVC) list(APPEND ASAN_UNITTEST_COMMON_CFLAGS -gcodeview) + # Incremental linking appears to break our global registration mechanism. + list(APPEND ASAN_UNITTEST_COMMON_LINKFLAGS -Wl,-incremental:no) endif() list(APPEND ASAN_UNITTEST_COMMON_LINKFLAGS -g) |