aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_init.h
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2010-04-01 19:25:25 +0200
committerMichal Krol <[email protected]>2010-04-01 19:25:25 +0200
commit13d2f3c7380be6cf476d56269c17b52c53f313b3 (patch)
tree7b44ad95625a3e8640eb4482ff97b806575c3b3e /src/gallium/auxiliary/util/u_init.h
parent8c519e5f87ad6e96c68a13fab636ffdb8c4930e9 (diff)
util: Declare .CRT$XCU data segment.
Diffstat (limited to 'src/gallium/auxiliary/util/u_init.h')
-rw-r--r--src/gallium/auxiliary/util/u_init.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_init.h b/src/gallium/auxiliary/util/u_init.h
index edbcf2dcb93..40dafadf973 100644
--- a/src/gallium/auxiliary/util/u_init.h
+++ b/src/gallium/auxiliary/util/u_init.h
@@ -40,6 +40,7 @@
/* add a pointer to the section where MSVC stores global constructor pointers */
/* see http://blogs.msdn.com/vcblog/archive/2006/10/20/crt-initialization.aspx and
http://stackoverflow.com/questions/1113409/attribute-constructor-equivalent-in-vc */
+#pragma data_seg(".CRT$XCU")
#define UTIL_INIT(f) static void __cdecl f##__init(void) {f();}; __declspec(allocate(".CRT$XCU")) void (__cdecl* f##__xcu)(void) = f##__init;
#elif defined(__GNUC__)
#define UTIL_INIT(f) static void f##__init(void) __attribute__((constructor)); static void f##__init(void) {f();}