Module: Mesa Branch: master Commit: 3e1caf5d2666ed220f4a740db4fe5a7ad54e455a URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3e1caf5d2666ed220f4a740db4fe5a7ad54e455a
Author: Benjamin Franzke <benjaminfran...@googlemail.com> Date: Wed Jun 8 15:50:25 2011 +0200 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). --- 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 d3b606c..72d4125 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); } _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit