Purpose of attribute_tls_model_ie
Joseph Myers
joseph@codesourcery.com
Fri Oct 16 15:22:00 GMT 2015
On Fri, 16 Oct 2015, Florian Weimer wrote:
> On 10/16/2015 03:31 PM, Joseph Myers wrote:
> > On Fri, 16 Oct 2015, Florian Weimer wrote:
> >
> >> Why are some thread-local variables marked with attribute_tls_model_ie?
> >
> > Maybe to indicate variables located in initial modules that are accessed
> > from other modules (i.e. for use when those other modules are being built,
> > without -ftls-model=initial-exec)?
>
> But this would not apply to the arena pointer in malloc/arena.c, right?
> (It's a static TLS variable, after all.) So we could drop it there and
> get better code for statically linked glibc.
Indeed. If it's being built as part of libc then the command-line option
should suffice. The attribute should help for cases such as the
GLIBC_PRIVATE TLS errno, however (subject to fixing the attribute to use
local-exec in static libraries (but not *_nonshared)).
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list