This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fixing the distribution problems with TLS and DTV_SURPLUS slots.
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Rich Felker <dalias at libc dot org>
- Cc: "Carlos O'Donell" <carlos at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>, Adam Conrad <adconrad at ubuntu dot com>, Roland McGrath <roland at hack dot frob dot com>, Siddhesh Poyarekar <siddhesh at redhat dot com>
- Date: Fri, 10 Oct 2014 09:37:22 -0300
- Subject: Re: Fixing the distribution problems with TLS and DTV_SURPLUS slots.
- Authentication-results: sourceware.org; auth=none
- References: <5432EFF9 dot 5020602 at redhat dot com> <orzjd8xv5v dot fsf at free dot home> <5436A03F dot 2050008 at redhat dot com> <20141010001525 dot GV23797 at brightrain dot aerifal dot cx>
On Oct 9, 2014, Rich Felker <dalias@libc.org> wrote:
> On Thu, Oct 09, 2014 at 10:48:31AM -0400, Carlos O'Donell wrote:
>> What if the module author can never tolerate GD-like performance and
>> would rather it fail than load and run slowly e.g. MESA/OpenGL?
> This is not the module author's decision to make. If the user wants to
> run, the user should be able to run.
Granted: user can always LD_PRELOAD the module that defines the variable
to ensure it gets to IE.
> I think (d) should be omitted, and a step (f) should be added: patch
> binutils to disallow the creation of .so files with IE TLS.
I wouldn't go as far as disallowing it, since there are perfectly
legitimate cases of IE accesses in dynamic libs. The most obvious
example is glibc plugins that access libdl.so or libc.so symbols, that
are always IE, but any app that provides symbols in IE modules and wants
to use IE to access them even from plugins should have no problem doing
so. It's not like TLSDesc GD is as efficient as IE; it's just pretty
close if the variable is in static TLS. If someone wishes to structure
their app to squeeze a little bit of extra performance by making
legitimate uses of IE, why not let them?
--
Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/ FSF Latin America board member
Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer