Index: src/mapi/entry_x86_tsd.h =================================================================== RCS file: /cvs/xenocara/lib/mesa/src/mapi/entry_x86_tsd.h,v retrieving revision 1.1.1.2 diff -u -p -r1.1.1.2 entry_x86_tsd.h --- src/mapi/entry_x86_tsd.h 11 Dec 2016 08:26:03 -0000 1.1.1.2 +++ src/mapi/entry_x86_tsd.h 21 Oct 2018 14:03:04 -0000 @@ -33,8 +33,17 @@ #define X86_ENTRY_SIZE 32 -__asm__(".text\n" - ".balign 32\n" +__asm__(".text"); + +__asm__("x86_current_table:\n\t" + "call 1f\n" + "1:\n\t" + "popl %eax\n\t" + "addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %eax\n\t" + "movl " ENTRY_CURRENT_TABLE "@GOT(%eax), %eax\n\t" + "ret"); + +__asm__(".balign 32\n" "x86_entry_start:"); #define STUB_ASM_ENTRY(func) \ @@ -44,12 +53,12 @@ __asm__(".text\n" func ":" #define STUB_ASM_CODE(slot) \ - "movl " ENTRY_CURRENT_TABLE ", %eax\n\t" \ + "call x86_current_table\n\t" \ "testl %eax, %eax\n\t" \ "je 1f\n\t" \ "jmp *(4 * " slot ")(%eax)\n" \ "1:\n\t" \ - "call " ENTRY_CURRENT_TABLE_GET "\n\t" \ + "call " ENTRY_CURRENT_TABLE_GET "@PLT\n\t" \ "jmp *(4 * " slot ")(%eax)" #define MAPI_TMP_STUB_ASM_GCC