Merge pull request #1919 from bosmacs/master
authorJoão Matos <joao@tritao.eu>
Thu, 9 Jul 2015 00:19:07 +0000 (01:19 +0100)
committerJoão Matos <joao@tritao.eu>
Thu, 9 Jul 2015 00:19:07 +0000 (01:19 +0100)
Add TLS offset for pre-release OS X 10.11 on amd64

mono/utils/mach-support-amd64.c

index 19040885da612aaf9908a3dedec6831aab1b491e..825f2a247804321bb05589102e09747231f9f730 100644 (file)
@@ -23,6 +23,7 @@
 /* All OSX versions up to 10.8 */
 #define TLS_VECTOR_OFFSET_CATS 0x60
 #define TLS_VECTOR_OFFSET_10_9 0xe0
+#define TLS_VECTOR_OFFSET_10_11 0x100
 
 static int tls_vector_offset;
 
@@ -130,6 +131,10 @@ mono_mach_init (pthread_key_t key)
        if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary)
                goto ok;
 
+       tls_vector_offset = TLS_VECTOR_OFFSET_10_11;
+       if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary)
+               goto ok;
+
        g_error ("could not discover the mach TLS offset");
 ok:
        pthread_setspecific (key, old_value);