There is no need for the #ifdef PIC in mini.c, the offset thingy already returns -1 in this case. MONO_THREAD_VAR_OFFSET can cast to a 32 bit type so that the stuff in other places is avoided. The `read_tls_offset_from_method' stuff should really go in the amd file. -- Ben