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).
{
}
+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);
}