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)
On Fri, May 09, 2003 at 05:08:00PM -0700, Richard Henderson wrote:
> On Sat, May 10, 2003 at 09:31:09AM +0930, Alan Modra wrote:
> > 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.
>
> I don't know enough ppc internals to have any idea what that means.
> Perhaps this is a -fPIC i.e. -mminimal-toc thing?
Yes. Supporting minimal-toc is a pain. -fPIC on ppc32 does two
things from a user perspective: 1) doesn't have the 33M text+data
limit imposed by -fpic's use of a blr to the GOT to get the GOT
pointer. 2) doesn't have a limit of 32k total GOT size, instead
allowing up to 64k per file. -fPIC with tls vars does (1), but
not (2). There's a total of 32k GOT size for tls. If we run into
GOT overflow then I guess we'll need to look at supporting .got2..
As a side note, it wouldn't be that hard to allow 64k of GOT for
ppc32, just a matter of having the linker put _GLOBAL_OFFSET_TABLE_
(and the blrl) in the middle of the GOT.
> If so, does that
> mean -fpic could get away with just pic_offset_table_rtx?
Yes. pic_offset_table_rtx could be used in other places in rs6000.c
instead of "gen_rtx_REG (Pmode, RS6000_PIC_OFFSET_TABLE_REGNUM)".
--
Alan Modra
IBM OzLabs - Linux Technology Centre