Bogus position independent code(PIC) emitted for ColdFire v4e
Richard Henderson
rth@redhat.com
Thu Dec 12 00:17:00 GMT 2002
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~
More information about the Gcc
mailing list