--- src/mesa/glapi/gl_x86_asm.py.orig 2008-11-17 10:47:31.000000000 +0100 +++ src/mesa/glapi/gl_x86_asm.py 2008-11-17 12:37:22.000000000 +0100 @@ -139,14 +139,21 @@ print 'SEG_TEXT' print '' print '#ifdef GLX_USE_TLS' + print '\t#undef __i686 /* gcc gets in our way */' + print '\t.section\t.gnu.linkone.t.__i686.get_pc_thunk.ax,"ax",@progbits' + print '\tGLOBL __i686.get_pc_thunk.ax' + print '\tHIDDEN (__i686.get_pc_thunk.ax)' + print '\tALIGNTEXT16' + print '__i686.get_pc_thunk.ax:' + print '\tmovl (%esp), %eax' + print '\tret' print '' print '\tGLOBL\tGLNAME(_x86_get_dispatch)' print '\tHIDDEN(GLNAME(_x86_get_dispatch))' - print 'ALIGNTEXT16' + print '\tALIGNTEXT16' print 'GLNAME(_x86_get_dispatch):' - print '\tcall 1f' - print '1:\tpopl %eax' - print '\taddl $_GLOBAL_OFFSET_TABLE_+[.-1b], %eax' + print '\tcall __i686.get_pc_thunk.ax' + print '\taddl $_GLOBAL_OFFSET_TABLE_, %eax' print '\tmovl _glapi_tls_Dispatch@GOTNTPOFF(%eax), %eax' print '\tret' print ''