GNU C and ROM based code

Keith Wright kwright@gis.net
Thu Jun 7 17:45:00 GMT 2001


Cross-posted from Coldfire list to CrossGcc list

> From: Keith Wright <kwright@gis.net>
> 
> > From: Rafael Collantes <racb@cesinel.com>
> > 
> > What I want is to produce a program with GCC and put it into the
> > user Flash area using UPDUSER command. I am using a 5206eLite
> > board.

> This has nothing to do with GCC, you can't blame the compiler for
> generating code that won't run in ROM if you can't get it into ROM.

Well, I'm in a bellicose mood; I'm going to argue with myself.

It's true that gcc/ld can be used to put code into ROM, but the whole
process would be easier if gcc could generate Position Independant
Code for the Motorola 68000/Coldfire family (the -fPIC option).  Is
anybody working on this?  Does anybody have any advice for one who
might be tempted to attempt it?  Is there any essential difference
between PIC for dynamic linking and PIC just to make the code movable,
e.g. so it can run either in ROM or RAM?

-- 
     -- Keith Wright  <kwright@free-comp-shop.com>

Programmer in Chief, Free Computer Shop < http://www.free-comp-shop.com >
         ---  Food, Shelter, Source code.  ---

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com



More information about the crossgcc mailing list