[PATCH] D28435: [compiler-rt] Define delimiters for sanitizer coverage's binary section on Windows.

Marcos Pividori via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 2 15:13:34 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL293959: [sancov] Define delimiters for sanitizer coverage's binary section on Windows. (authored by mpividori).

Changed prior to commit:
  https://reviews.llvm.org/D28435?vs=85840&id=86897#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D28435

Files:
  compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt
  compiler-rt/trunk/lib/sanitizer_common/sanitizer_coverage_win_sections.cc


Index: compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt
+++ compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt
@@ -56,6 +56,7 @@
   sanitizer_coverage_libcdep.cc
   sanitizer_coverage_libcdep_new.cc
   sanitizer_coverage_mapping_libcdep.cc
+  sanitizer_coverage_win_sections.cc
   sanitizer_linux_libcdep.cc
   sanitizer_posix_libcdep.cc
   sanitizer_stacktrace_libcdep.cc
@@ -211,6 +212,7 @@
     ${SANITIZER_COMMON_SUPPORTED_OS}
     ARCHS ${SANITIZER_COMMON_SUPPORTED_ARCH}
     SOURCES sanitizer_coverage_win_dll_thunk.cc
+            sanitizer_coverage_win_sections.cc
     CFLAGS ${SANITIZER_CFLAGS} -DSANITIZER_DLL_THUNK
     DEFS ${SANITIZER_COMMON_DEFINITIONS})
 
@@ -230,6 +232,7 @@
     ${SANITIZER_COMMON_SUPPORTED_OS}
     ARCHS ${SANITIZER_COMMON_SUPPORTED_ARCH}
     SOURCES sanitizer_coverage_win_dynamic_runtime_thunk.cc
+            sanitizer_coverage_win_sections.cc
     CFLAGS ${SANITIZER_CFLAGS} ${DYNAMIC_RUNTIME_THUNK_CFLAGS}
     DEFS ${SANITIZER_COMMON_DEFINITIONS})
 endif()
Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_coverage_win_sections.cc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_coverage_win_sections.cc
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_coverage_win_sections.cc
@@ -0,0 +1,22 @@
+//===-- sanitizer_coverage_win_sections.cc --------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines delimiters for Sanitizer Coverage's section.
+//===----------------------------------------------------------------------===//
+
+#include "sanitizer_platform.h"
+#if SANITIZER_WINDOWS
+#include <stdint.h>
+#pragma section(".SCOV$A", read, write)  // NOLINT
+#pragma section(".SCOV$Z", read, write)  // NOLINT
+extern "C" {
+__declspec(allocate(".SCOV$A")) uint32_t __start___sancov_guards = 0;
+__declspec(allocate(".SCOV$Z")) uint32_t __stop___sancov_guards = 0;
+}
+#endif // SANITIZER_WINDOWS


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28435.86897.patch
Type: text/x-patch
Size: 2330 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170202/8c64161b/attachment.bin>


More information about the llvm-commits mailing list