Linking against Rom Image

Joel Sherrill joel.sherrill at OARcorp.com
Mon Feb 26 19:28:24 UTC 2001



Peter Müller wrote:
> 
> Hi,
> 
> some time ago I already trieded to figure out how it is possible to link an
> application against code that is already available in ROM. But it found no
> good solution since then.
> 
> The reason why I want to do this is that my application (+rtems) is several
> hundred kilobytes large and developing cycles (download, debug ...) takes to
> long.
> 
> Because the rtems code itself is always the same I would like to have it on
> ROM (e.g. starting from 0). The application resides in RAM and is linked
> against rtems located in ROM. So only the application has to be downloaded
> for debugging.
> 
> How can I do this? Is there a way to link the app against rtems, but not
> include rtems in the final exe file? Any docu about that?

Chris Johns has done something like this with My Right Boot.  

GNU ld has an option to link against a previously linked image.  This 
is what you want.  Here is the excerpt from the ld docs:

`-R FILENAME'
`--just-symbols=FILENAME'
     Read symbol names and their addresses from FILENAME, but do not
     relocate it or include it in the output.  This allows your output
     file to refer symbolically to absolute locations of memory defined
     in other programs.  You may use this option more than once.

     For compatibility with other ELF linkers, if the `-R' option is
     followed by a directory name, rather than a file name, it is
     treated as the `-rpath' option.
                                                                        

> Thank you very much,
> Peter

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985



More information about the users mailing list