This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix tls model dumping
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 29 Jan 2015 17:31:14 +0100
- Subject: Re: Fix tls model dumping
- Authentication-results: sourceware.org; auth=none
- References: <20150128195622 dot GB12782 at kam dot mff dot cuni dot cz> <20150129033516 dot GF12931 at bubble dot grove dot modra dot org> <20150129050716 dot GB10430 at kam dot mff dot cuni dot cz> <20150129054338 dot GG12931 at bubble dot grove dot modra dot org> <20150129080336 dot GE1746 at tucnak dot redhat dot com>
> On Thu, Jan 29, 2015 at 04:13:38PM +1030, Alan Modra wrote:
> > On Thu, Jan 29, 2015 at 06:07:16AM +0100, Jan Hubicka wrote:
> > > > On Wed, Jan 28, 2015 at 08:56:22PM +0100, Jan Hubicka wrote:
> > > > > -const char * const tls_model_names[]={"none", "tls-emulated", "tls-real",
> > > > > - "tls-global-dynamic", "tls-local-dynamic",
> > > > > - "tls-initial-exec", "tls-local-exec"};
> > > > > +const char * const tls_model_names[]={"none", "emulated",
> > > > > + "global-dynamic", "local-dynamic",
> > > > > + "initial-exec", "local-exec"};
> > > >
> > > > I just made the same mistake in a binutils commit message. The proper
> > > > term is general-dynamic, not global-dynamic. See Drepper's TLS paper,
> > > > section 4. http://www.akkadia.org/drepper/tls.pdf
> > >
> > > Hmm, this seems to disagree with our attribute:
> > > @item -ftls-model=@var{model}
> > > @opindex ftls-model
> > > Alter the thread-local storage model to be used (@pxref{Thread-Local}).
> > > The @var{model} argument should be one of @code{global-dynamic},
> > > @code{local-dynamic}, @code{initial-exec} or @code{local-exec}.
> >
> > Huh, it must have been Drepper that made the mistake. :-)
>
> Even the tls.pdf mentions sometimes Global Dynamic and sometimes General
> Dynamic. But the Global Dynamic is in additions made by me apparently.
>
> Anyway, I think it is too late to change this now on the GCC side,
> we it is part of options and attributes.
One thing we can do is to add alias and accept both names...
Honza
>
> Jakub