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]

Re: Relocatable code


>   I'm programming with gcc for ARM (ARM7TDMI) and I wonder if there's a
> way to make gcc compile relocatable code. My ARM processor hasn't got an
> MMU and I would want to be able to store programs in flash or receive
> them via serial port and put them to work at any memory region.
> 
>   Another question that I have is the topic of this list. Is my question
> suitable? Which aspects can be discussed here?

Gcc on the ARM support Position Independent Code, but not Position 
Independent Data.  For PIC, use the flag -fPIC.  You may need to do some 
work with the linker to make everything work in your target environment; 
I've never tried PIC except in the context of a shared library on a full 
OS.

Richard.


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