gcc m68k: pc-relative addressing for code?

Michael Schwingen michaels@stochastik.rwth-aachen.de
Sat Feb 21 07:58:00 GMT 1998


Hi,

is it possible to have gcc create output which only uses PC-relative
addressing for code references? 

I need this for ROM code which is moved around during PMMU initialization -
however, variables are in a constant place in RAM and shall *not* be
referenced PC-relative, so -fpic or -fPIC seems not to be usable in this
case, and the addressing via GOT seems to be a bit inefficient, too - the
PC-relative addressing mode would be better (32k code limit is not a
problem).

(a nice thing to have would be if all variables could be referenced relative
to an address register, which is *not* reloaded by gcc - however, I can live
without).

cu
Michael
-- 
In the beginning there was nothing, which exploded.



More information about the Gcc mailing list