*/
#include "entry.h"
+#include "u_current.h"
+#include "u_macros.h"
+
+/* define macros for use by assembly dispatchers */
+#define ENTRY_CURRENT_TABLE U_STRINGIFY(u_current_table)
#if defined(USE_X86_ASM) && defined(__GNUC__)
# ifdef GLX_USE_TLS
#else
#include <stdlib.h>
-#include "u_current.h"
/* C version of the public entries */
#define MAPI_TMP_DEFINES
__asm__(".text");
__asm__("x86_64_current_tls:\n\t"
- "movq u_current_table@GOTTPOFF(%rip), %rax\n\t"
+ "movq " ENTRY_CURRENT_TABLE "@GOTTPOFF(%rip), %rax\n\t"
"ret");
__asm__(".balign 32\n"
func ":"
#define STUB_ASM_CODE(slot) \
- "movq u_current_table@GOTTPOFF(%rip), %rax\n\t" \
+ "movq " ENTRY_CURRENT_TABLE "@GOTTPOFF(%rip), %rax\n\t" \
"movq %fs:(%rax), %r11\n\t" \
"jmp *(8 * " slot ")(%r11)"
"1:\n\t"
"popl %eax\n\t"
"addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %eax\n\t"
- "movl u_current_table@GOTNTPOFF(%eax), %eax\n\t"
+ "movl " ENTRY_CURRENT_TABLE "@GOTNTPOFF(%eax), %eax\n\t"
"ret");
#ifndef GLX_X86_READONLY_TEXT
func ":"
#define STUB_ASM_CODE(slot) \
- "movl u_current_table, %eax\n\t" \
+ "movl " ENTRY_CURRENT_TABLE ", %eax\n\t" \
"testl %eax, %eax\n\t" \
"je 1f\n\t" \
"jmp *(4 * " slot ")(%eax)\n" \