This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] TLS support for powerpc/powerpc64 (take 2)
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Richard Henderson <rth at redhat dot com>, Janis Johnson <janis187 at us dot ibm dot com>, gcc-patches at gcc dot gnu dot org, jakub at redhat dot com
- Date: Sat, 10 May 2003 09:31:09 +0930
- Subject: Re: [PATCH] TLS support for powerpc/powerpc64 (take 2)
- References: <20030509093004.A1775@us.ibm.com> <20030509225531.GK23973@redhat.com>
On Fri, May 09, 2003 at 03:55:31PM -0700, Richard Henderson wrote:
> On Fri, May 09, 2003 at 09:30:04AM -0700, Janis Johnson wrote:
> > +static GTY(()) rtx rs6000_tls_symbol;
> > +static rtx
> > +rs6000_tls_get_addr ()
> > +{
> > + if (!rs6000_tls_symbol)
> > + rs6000_tls_symbol = gen_rtx_SYMBOL_REF (Pmode, "__tls_get_addr");
>
> You should use init_one_libfunc instead of gen_rtx_SYMBOL_REF
> so that the proper SYMBOL_REF_FLAGS are set. I'm surprised
> that you didn't see problems on the ppc64 port because of this.
That code preceded your SYMBOL_REF_FLAGS changes..
[snip]
> I'm surprised that you have to work this hard to get the GOT pointer
> for 32-bit mode PIC. I'd have expected that you could just use
> pic_offset_table_rtx and have the prologue set it up for you.
The reason is that we're storing all tls symbol addresses in .got
rather than messing with .got2. The idea was to have ld handle all
tls got entries via relocs rather than needing to explicitly generate
.got2 entries in gcc.
--
Alan Modra
IBM OzLabs - Linux Technology Centre