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/CMakeLists.txt | |
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/CMakeLists.txt')
-rw-r--r-- | lib/asan/CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/asan/CMakeLists.txt b/lib/asan/CMakeLists.txt index 4cc2b3ded..2a946e491 100644 --- a/lib/asan/CMakeLists.txt +++ b/lib/asan/CMakeLists.txt @@ -9,6 +9,7 @@ set(ASAN_SOURCES asan_fake_stack.cc asan_flags.cc asan_globals.cc + asan_globals_win.cc asan_interceptors.cc asan_linux.cc asan_mac.cc @@ -63,6 +64,7 @@ set(ASAN_DYNAMIC_CFLAGS ${ASAN_CFLAGS}) append_list_if(COMPILER_RT_HAS_FTLS_MODEL_INITIAL_EXEC -ftls-model=initial-exec ASAN_DYNAMIC_CFLAGS) append_list_if(MSVC /DEBUG ASAN_DYNAMIC_LINK_FLAGS) +append_list_if(MSVC /INCREMENTAL:NO ASAN_DYNAMIC_LINK_FLAGS) append_list_if(COMPILER_RT_HAS_LIBC c ASAN_DYNAMIC_LIBS) append_list_if(COMPILER_RT_HAS_LIBDL dl ASAN_DYNAMIC_LIBS) @@ -205,6 +207,7 @@ else() STATIC ARCHS ${arch} SOURCES asan_win_dll_thunk.cc + asan_globals_win.cc $<TARGET_OBJECTS:RTInterception.${arch}> CFLAGS ${ASAN_CFLAGS} -DASAN_DLL_THUNK DEFS ${ASAN_COMMON_DEFINITIONS} @@ -221,6 +224,7 @@ else() STATIC ARCHS ${arch} SOURCES asan_win_dynamic_runtime_thunk.cc + asan_globals_win.cc CFLAGS ${ASAN_CFLAGS} ${DYNAMIC_RUNTIME_THUNK_CFLAGS} DEFS ${ASAN_COMMON_DEFINITIONS} PARENT_TARGET asan) |