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]

gcc m68k: pc-relative addressing for code?


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.


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