Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Unified Diff: syzygy/integration_tests/deferred_free_tests.cc

Issue 2989023003: Add correct linker symbols fot tls for win64. (Closed)
Patch Set: Add correct linker symbols fot tls for win64. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: syzygy/integration_tests/deferred_free_tests.cc
diff --git a/syzygy/integration_tests/deferred_free_tests.cc b/syzygy/integration_tests/deferred_free_tests.cc
index 08ed18bb076798bb03e03c86b4e03bae18954331..5cbe50467b2e2ec93db5d28ce0290ab088fc5279 100644
--- a/syzygy/integration_tests/deferred_free_tests.cc
+++ b/syzygy/integration_tests/deferred_free_tests.cc
@@ -51,11 +51,27 @@ void NTAPI TlsCallback(PVOID, DWORD dwReason, PVOID) {
}
// Magic to set the TLS callback.
+#ifdef _WIN64
+#pragma comment(linker, "/INCLUDE:_tls_used")
+#pragma comment(linker, "/INCLUDE:tls_callback_func")
+#else
#pragma comment(linker, "/INCLUDE:__tls_used")
#pragma comment(linker, "/INCLUDE:_tls_callback_func")
+#endif
+
+#ifdef _WIN64
+#pragma const_seg(".CRT$XLF")
+#else
#pragma data_seg(".CRT$XLF")
+#endif
+
EXTERN_C PIMAGE_TLS_CALLBACK tls_callback_func = TlsCallback;
+
+#ifdef _WIN64
+#pragma const_seg()
+#else
#pragma data_seg()
+#endif //_WIN64
} // namespace
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698