This is the mail archive of the gcc@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: Bogus position independent code(PIC) emitted for ColdFire v4e


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~


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