relocation for ROMd systems?

Ian Lance Taylor ian@zembu.com
Tue Nov 9 10:18:00 GMT 1999


   Date: Tue, 9 Nov 1999 10:14:09 -0800
   From: "Aaron J. Grier" <aaron@frye.com>

   I know that objcopy can relocate sections with --change-address and
   friends: I was wondering how exactly these are used with regard to
   linker scripts.  I assume I write my linker script to put .data in RAM,
   and use "objcopy --change-section-lma" to move things down into ROM,
   provided I have a procedure (inside software_init_hook?) to copy
   preinitialized .data up to link-time specified RAM.  Right?  Does
   anybody have an example linker script and objcopy they could share for
   generating ROM images from the GNU toolchain?

You basically have the right idea.  However, more normally you would
use the AT modifier in your linker script, rather than objcopy
--change-section-lma.  See the documentation of AT in the linker
manual.

Ian

------
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