[Mesa-dev] [Bug 35268] initial-exec TLS model breaks dlopen'ed libGL

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Oct 13 07:03:47 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=35268

--- Comment #23 from Sora Lee <saih792 at outlook.com> ---
(In reply to Rich Felker from comment #22)
> Ping.
> 
> Looking at this again, I see the original proposed patch introduced a lot of
> extra asm to save/restore registers that might be clobbered by
> __tls_get_addr. That could all go away if tlsdesc support is assumed and
> used.
> 
> The patch also adds some dubious prefix bytes to instructions in
> _x86_64_get_dispatch. Is there any reason for that?

I believe the operand size override prefixes are necessary to use @TLSGD on the
x86-64 architecture.

I've remade the original patches for compatibility with mesa 18.2.2 and
implemented TLSDESC as you suggested using
https://www.fsfla.org/~lxoliva/writeups/TLS/RFC-TLSDESC-x86.txt as a guide,
however I still seem to be getting issues with the _glapi_tls_Dispatch symbol.
In particular, my test code (dlopen_test.c) throws:

dlopen failed with message 'Error relocating /usr/lib/libglapi.so:
_glapi_tls_Dispatch: initial-exec TLS resolves to dynamic definition in
/usr/lib/libglapi.so'

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20181013/5b8d236f/attachment.html>


More information about the mesa-dev mailing list