Jakub Jelinek wrote:
These two patches cooperate to enable TLS support. For now you much manually add "#define GlxUseThreadLocalStorage YES" to your host.def to enable TLS support. Apply the Mesa patch to the Mesa tree and the DRI patch to the DRI tree.
This patch creates an unnecessary amount of TLS relocations (which among other things are not prelinkable) and libGL.so is still DT_TEXTREL, which makes it unshareable between processes. I'm attaching my version of libGL patches, against xorg-x11 tree, but it shouldn't be that far from mesa tree.
Yeah, there's a lot of stuff in the Redhat RPMs that aren't in my patch yet. I'm trying to take things in small steps to make it easier to find binary compatability problems as they crop up. The other part of the problem is that I don't fully understand a lot of this stuff. I haven't gotten down to this level of linker magic in a long, long time. Can you recommend any good reading material on the subject?
Right now libGL will try for a TLS driver first, and fallback to the non-TLS driver if tls/*_dri.so does not exist. I am considering adding an env variable to make libGL ignore the TLS drivers altogether. The only catch with this would be that using the env var would not disable libGL's use of TLS.
There are a couple gaps in my understanding of TLS. I hope that someone on the list can fill me in. I've seen that a few apps require 'LD_ASSUME_KERNEL=2.4.19' to disable TLS. Doing that with, for example, glxgears doesn't seem to make any difference. It still uses the TLS libGL.so and the TLS driver. What is this option /really/ supposed to do?
LD_ASSUME_KERNEL env variable is not about disabling TLS. All it does is change a kernel version the dynamic linker uses to determine which libraries should be used. Every program or a shared library can specify kernel version requirement in its .note.ABI-tag section. If you build e.g. libGL.so.1 with a requirement for kernel 2.4.20 or later, and use LD_ASSUME_KERNEL=2.4.19 in the environment, the dynamic linker will skip this shared library and continue searching for another libGL.so.1. See http://people.redhat.com/drepper/assumekernel.html for details.
About 15 people sent me e-mail with that link. :) The one thing I didn't see was how to put that note in a library. Is there some special section attributes in the source or is there some linker magic?
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel
