This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Bogus position independent code(PIC) emitted for ColdFire v4e
- From: Richard Henderson <rth at redhat dot com>
- To: Hans-Peter Nilsson <hp at bitrange dot com>
- Cc: Peter Barada <pbarada at mail dot wm dot sps dot mot dot com>, gcc at gcc dot gnu dot org, Peter dot Barada at motorola dot com, peter at baradas dot org
- Date: Wed, 11 Dec 2002 23:58:38 -0800
- Subject: Re: Bogus position independent code(PIC) emitted for ColdFire v4e
- References: <20021206190701.GB15574@redhat.com> <Pine.BSF.4.44.0212112348440.2939-100000@dair.pair.com>
On Thu, Dec 12, 2002 at 01:33:50AM -0500, Hans-Peter Nilsson wrote:
> > I think you're better off going the UNSPEC route.
>
> Any particular reason?
First, because there's a clear distinction between
static int *x = &foo;
and
auto int *x = &foo;
in that the first /must/ be a direct relocation vs foo,
and the second oughtn't be in pic mode.
> I chose the ENCODE_SECTION_INFO route for CRIS, because in a
> perfect GCC, going that route would supposedly enable GCC to
> optimize symbol references (for example, combining foo and
> foo+N).
*shrug* Often one can use (const (plus (unspec) (const_int))).
Depends on whether or not the spec is broken wrt (foo+N)@GOT,
as it is in many AT&T defined psABIs.
r~