diff options
author | Benjamin Franzke <[email protected]> | 2011-06-08 15:50:25 +0200 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2011-06-13 12:19:47 +0800 |
commit | 3e1caf5d2666ed220f4a740db4fe5a7ad54e455a (patch) | |
tree | 88a3dcb43b282d41659f205f51f2be1d24a2f606 /src/mapi | |
parent | 982cb365848ebb7e64dc0915e37793e5823e4bbf (diff) |
mapi: Fix tls with shared/es-glapi on x86-64
x86_64_entry_start needs to be declared static in the C code,
in order to have the correct address in entry_get_public
(seems not to be needed on x86).
The compiler needs to lookup a local not a global object.
Otherwise addresses needed for _glapi_proc_address will be computed
from some random offset (0x6400229a61058b48 in my case).
Diffstat (limited to 'src/mapi')
-rw-r--r-- | src/mapi/mapi/entry_x86-64_tls.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mapi/mapi/entry_x86-64_tls.h b/src/mapi/mapi/entry_x86-64_tls.h index d3b606c8ac5..72d4125a694 100644 --- a/src/mapi/mapi/entry_x86-64_tls.h +++ b/src/mapi/mapi/entry_x86-64_tls.h @@ -76,10 +76,12 @@ entry_patch_public(void) { } +static char +x86_64_entry_start[]; + mapi_func entry_get_public(int slot) { - extern char x86_64_entry_start[]; return (mapi_func) (x86_64_entry_start + slot * 32); } |