--- a/src/mesa/x86/glapi_x86.S.org 2007-11-18 15:02:54.000000000 +0100 +++ b/src/mesa/x86/glapi_x86.S 2007-11-18 15:09:52.000000000 +0100 @@ -115,14 +115,20 @@ SEG_TEXT #ifdef GLX_USE_TLS - +#undef __i686 /* gcc gets in our way */ + .section .gnu.linkone.t.__i686.get_pc_thunk.ax,"ax",@progbits + GLOBL __i686.get_pc_thunk.ax + HIDDEN (__i686.get_pc_thunk.ax) +__i686.get_pc_thunk.ax: + movl (%esp), %eax + ret +SEG_TEXT GLOBL GLNAME(_x86_get_dispatch) HIDDEN(GLNAME(_x86_get_dispatch)) ALIGNTEXT16 GLNAME(_x86_get_dispatch): - call 1f -1: popl %eax - addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %eax + call __i686.get_pc_thunk.ax + addl $_GLOBAL_OFFSET_TABLE_, %eax movl _glapi_tls_Dispatch@GOTNTPOFF(%eax), %eax ret