--- ./src/mesa/x86/glapi_x86.S.org 2007-08-19 16:42:26.000000000 +0200 +++ ./src/mesa/x86/glapi_x86.S 2007-08-19 16:43:37.000000000 +0200 @@ -114,14 +114,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 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