loader: Use a hidden function instead of an exported global variable to setup pthread functions.
diff --git a/loader/kthread.c b/loader/kthread.c
index acfa10f..c791ef6 100644
--- a/loader/kthread.c
+++ b/loader/kthread.c
@@ -324,7 +324,7 @@
 /***********************************************************************
  *           pthread_functions
  */
-const struct wine_pthread_functions pthread_functions =
+static const struct wine_pthread_functions pthread_functions =
 {
     init_process,
     init_thread,
@@ -336,6 +336,10 @@
     sigprocmask
 };
 
+void init_pthread_functions(void)
+{
+    wine_pthread_set_functions( &pthread_functions, sizeof(pthread_functions) );
+}
 
 /* Currently this probably works only for glibc2,
  * which checks for the presence of double-underscore-prepended
diff --git a/loader/main.c b/loader/main.c
index 289eb68..314398d 100644
--- a/loader/main.c
+++ b/loader/main.c
@@ -106,7 +106,7 @@
             reserve_area( wine_main_preload_info[i].addr, wine_main_preload_info[i].size );
     }
 
-    wine_pthread_set_functions( &pthread_functions, sizeof(pthread_functions) );
+    init_pthread_functions();
     wine_init( argc, argv, error, sizeof(error) );
     fprintf( stderr, "wine: failed to initialize: %s\n", error );
     exit(1);
diff --git a/loader/main.h b/loader/main.h
index 8284477..0c6fc84 100644
--- a/loader/main.h
+++ b/loader/main.h
@@ -30,6 +30,10 @@
     size_t size;
 };
 
-extern const struct wine_pthread_functions pthread_functions;
+#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
+extern void init_pthread_functions(void) __attribute__((visibility ("hidden")));
+#else
+extern void init_pthread_functions(void);
+#endif
 
 #endif /* __WINE_LOADER_MAIN_H */
diff --git a/loader/pthread.c b/loader/pthread.c
index dd1a3ba..4951d97 100644
--- a/loader/pthread.c
+++ b/loader/pthread.c
@@ -246,7 +246,7 @@
 /***********************************************************************
  *           pthread_functions
  */
-const struct wine_pthread_functions pthread_functions =
+static const struct wine_pthread_functions pthread_functions =
 {
     init_process,
     init_thread,
@@ -257,3 +257,8 @@
     abort_thread,
     pthread_sigmask
 };
+
+void init_pthread_functions(void)
+{
+    wine_pthread_set_functions( &pthread_functions, sizeof(pthread_functions) );
+}