This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] TLS support for powerpc/powerpc64 (take 2)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]