This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PR18457] Don't require rtld lock to compute DTV addr for static TLS
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Siddhesh Poyarekar <siddhesh at redhat dot com>, Alexandre Oliva <aoliva at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 04 Jun 2015 12:58:49 -0400
- Subject: Re: [PR18457] Don't require rtld lock to compute DTV addr for static TLS
- Authentication-results: sourceware.org; auth=none
- References: <orvbf5ffyt dot fsf at livre dot home> <20150603152448 dot GC32684 at spoyarek dot pnq dot redhat dot com> <or6174g2gb dot fsf at livre dot home> <20150603172402 dot GD32684 at spoyarek dot pnq dot redhat dot com> <ormw0geaez dot fsf at livre dot home> <20150604053827 dot GJ32684 at spoyarek dot pnq dot redhat dot com>
On 06/04/2015 01:38 AM, Siddhesh Poyarekar wrote:
>> The case to worry about is a static executable, that for whatever reason
>> doesn't get these variables linked in, but that dlopens some library
>> that depends on libc.so, which then brings these variables into the
>> running image. If libc.so had these variables as IE, this dlopen could
>> fail.
>
> This seems to make a case for not having any variables in libc.so as
> IE, yet a number of them already are.
In practice all IE variables should be removed from dynamic libraries
and be replaced with the more flexible TLS descriptors.
However, presently, we allocate extra static TLS image space and
surplus DTV entries to allow for some core coordinated set of DSOs
to be able to be loaded with static-TLS-using IE variables.
Making all core DSOs IE-free is a worthwhile but orthogonal problem.
Cheers,
Carlos.