summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitry Andric <[email protected]>2011-01-27 18:03:42 -0700
committerBrian Paul <[email protected]>2011-01-27 18:04:57 -0700
commitcfb9aae3ec4e42bd9be8445039dc52b8d6c71f9c (patch)
tree6fca04bd880b0d360fedd83e89a94a86058cc3dd /src
parent6dc0a0e71f3a911437a88798145e18d176703482 (diff)
glapi: add @GOTPCREL relocation type
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=33440 This replaces commit 731ec60da3ccb92f5bfb4d6f1bc3c8e712751376 NOTE: This is a candidate for the 7.9 and 7.10 branches Signed-off-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mapi/glapi/gen/gl_x86-64_asm.py3
-rw-r--r--src/mapi/glapi/glapi_x86-64.S3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/mapi/glapi/gen/gl_x86-64_asm.py b/src/mapi/glapi/gen/gl_x86-64_asm.py
index 2fa140dc308..11cd9af4061 100644
--- a/src/mapi/glapi/gen/gl_x86-64_asm.py
+++ b/src/mapi/glapi/gen/gl_x86-64_asm.py
@@ -166,7 +166,8 @@ class PrintGenericStubs(gl_XML.gl_print_base):
print ''
print '\t.p2align\t4,,15'
print '_x86_64_get_dispatch:'
- print '\tmovq\t_gl_DispatchTSD(%rip), %rdi'
+ print '\tmovq\t_gl_DispatchTSD@GOTPCREL(%rip), %rax'
+ print '\tmovl\t(%rax), %edi'
print '\tjmp\tpthread_getspecific@PLT'
print ''
print '#elif defined(THREADS)'
diff --git a/src/mapi/glapi/glapi_x86-64.S b/src/mapi/glapi/glapi_x86-64.S
index 469fac31ae6..c42646f0165 100644
--- a/src/mapi/glapi/glapi_x86-64.S
+++ b/src/mapi/glapi/glapi_x86-64.S
@@ -73,7 +73,8 @@ _x86_64_get_dispatch:
.p2align 4,,15
_x86_64_get_dispatch:
- movq _gl_DispatchTSD(%rip), %rdi
+ movq _gl_DispatchTSD@GOTPCREL(%rip), %rax
+ movl (%rax), %edi
jmp pthread_getspecific@PLT
#elif defined(THREADS)