summaryrefslogtreecommitdiff
path: root/lib/asan/asan_win.cc
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2016-11-17 19:02:53 +0000
committerReid Kleckner <rnk@google.com>2016-11-17 19:02:53 +0000
commit1ab93d4538f7f20912fc97b9f01259d0e55d54d7 (patch)
tree7c57fa58dc72df76ad5d37896285a3f373f83a58 /lib/asan/asan_win.cc
parentbb14ea9c2c7daefe441f6b8568f353cabff05e84 (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/asan_win.cc')
-rw-r--r--lib/asan/asan_win.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/asan/asan_win.cc b/lib/asan/asan_win.cc
index 4e676de8b..78268d83e 100644
--- a/lib/asan/asan_win.cc
+++ b/lib/asan/asan_win.cc
@@ -19,6 +19,7 @@
#include <stdlib.h>
+#include "asan_globals_win.h"
#include "asan_interceptors.h"
#include "asan_internal.h"
#include "asan_report.h"
@@ -367,8 +368,9 @@ __declspec(allocate(".CRT$XLAB")) void (NTAPI *__asan_tls_init)(void *,
unsigned long, void *) = asan_thread_init;
#endif
+ASAN_LINK_GLOBALS_WIN()
// }}}
} // namespace __asan
-#endif // _WIN32
+#endif // SANITIZER_WINDOWS