Mesa (7.9): glapi: add @GOTPCREL relocation type
Brian Paul
brianp at kemper.freedesktop.org
Tue Feb 22 01:20:22 UTC 2011
Module: Mesa
Branch: 7.9
Commit: 3959f9f7c8487ad424096d2fe26f368cccc180fb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3959f9f7c8487ad424096d2fe26f368cccc180fb
Author: Dimitry Andric <dimitry at andric.com>
Date: Thu Jan 27 18:03:42 2011 -0700
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 <brianp at vmware.com>
(cherry picked from commit cfb9aae3ec4e42bd9be8445039dc52b8d6c71f9c)
---
src/mapi/glapi/gen/gl_x86-64_asm.py | 3 ++-
src/mapi/glapi/glapi_x86-64.S | 3 ++-
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 e6e78c4..0fc405c 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 at GOTPCREL(%rip), %rax'
+ print '\tmovl\t(%rax), %edi'
print '\tjmp\tpthread_getspecific at 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 8cfd815..8e69d63 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 at GOTPCREL(%rip), %rax
+ movl (%rax), %edi
jmp pthread_getspecific at PLT
#elif defined(THREADS)
More information about the mesa-commit
mailing list