different load and execution address ...

Lars Segerlund lars.segerlund@comsys.se
Fri May 16 10:03:00 GMT 2003


  I am trying to compile a program for execution in processor internal 
sram on a uClinux system, using gcc & binutils.

  I have been fiddling around a lot with linker scripts and such and 
have had limited success, but I think I have to ask about this.

  I have some files a.o b.o which I want to be placed in this internal 
sram, and called from the regular program ( executing from the load 
address determined by the system ).

  As i can understand, I can make a section in the liker script and list 
the files in the script, and thus have them and all variables placed 
there, however when I try to load the binary ( binfmt-flat ) I get an 
relocation error :

  BINFMT_FLAT: reloc outside program 0x200020ca (0 - 0x16f5bc/0x1d80), 
killing te!

  So I would like to make these files into a binary to reside at this 
sram address instead, and then include the binary when linking the main 
program, and somehow automatically get the address of the routines in 
the sram ( which would be separately linked into a binary ).

  What I haven't been able to figure out is how to build this binary, 
does anybody have any hints ?

  / regards, Lars Segerlund.




More information about the Binutils mailing list