This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Painful problems with -fpic implementation on powerpc-sysv
- To: Richard Henderson <rth at cygnus dot com>
- Subject: Re: Painful problems with -fpic implementation on powerpc-sysv
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 26 Aug 1998 19:29:57 -0600
- cc: David Edelsohn <dje at watson dot ibm dot com>, Geoff Keating <geoffk at ozemail dot com dot au>, egcs at cygnus dot com, Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Reply-To: law at cygnus dot com
In message <19980826122503.D1747@dot.cygnus.com>you write:
> On Wed, Aug 26, 1998 at 01:11:02AM -0600, Jeffrey A Law wrote:
> > This could work for cases where one is trying to build up a constant,
> > but would not work if (for example) reload decided try and put
> > (const (plus (symbol_ref) (offset)) into the constant pool. Yes, this
> > does really happen and it is painful.
>
> If this happens, it is a bug. With -fpic, a symbol_ref is not a
> constant, and will result in a run-time relocation to .rodata.
> Not good.
Certainly not good. But it happens.
Consider a target where it is impossible to synthesize the sequence
at reload time. It can (and does) happen on the PA. It has to go into
memory. Of course, we don't want it in readonly memory because of
shared library issues, so we arrange to get it into the normal data
segment.
jeff