From: Benjamin Franzke Date: Wed, 8 Jun 2011 13:50:25 +0000 (+0200) Subject: mapi: Fix tls with shared/es-glapi on x86-64 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3e1caf5d2666ed220f4a740db4fe5a7ad54e455a;p=mesa.git 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). --- 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); }