summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--compiler-rt/lib/profile/InstrProfilingPlatformOther.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler-rt/lib/profile/InstrProfilingPlatformOther.c b/compiler-rt/lib/profile/InstrProfilingPlatformOther.c
index d12fbf7ccc4..e1233cbe65b 100644
--- a/compiler-rt/lib/profile/InstrProfilingPlatformOther.c
+++ b/compiler-rt/lib/profile/InstrProfilingPlatformOther.c
@@ -91,4 +91,13 @@ ValueProfNode *__llvm_profile_end_vnodes(void) { return 0; }
COMPILER_RT_VISIBILITY ValueProfNode *CurrentVNode = 0;
COMPILER_RT_VISIBILITY ValueProfNode *EndVNode = 0;
+#if defined(_WIN32)
+// Put read-write sections in .data.
+#pragma comment(linker, "/MERGE:.lprfc=.data")
+#pragma comment(linker, "/MERGE:.lprfd=.data")
+// Put read-write sections in .rdata.
+#pragma comment(linker, "/MERGE:.lcovmap=.rdata")
+#pragma comment(linker, "/MERGE:.lprfn=.rdata")
+#endif
+
#endif
OpenPOWER on IntegriCloud