Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: RomBox linker script
From: Jens Arnold (arnold-j_at_t-online.de)
Date: 2004-09-04


Hello Daniel,

as you reported that the rom.lds gives errors with binutils >=
2.15, I prepared a patch utilizing the same technique as Linus
used for adapting app.lds to the newer binutils.

Please check if it does work for you now. It works for me
(binutils 2.14), and the resulting binary seems to run fine, but
then I can test on recorder V1 only.

Regards, Jens

Here's the patch as cleartext, in case the attachment doesn't
get through on the list:
----------------------------------------------------------------

Index: firmware/rom.lds
===================================================================
RCS file: /cvsroot/rockbox/firmware/rom.lds,v
retrieving revision 1.2
diff -u -r1.2 rom.lds
--- firmware/rom.lds 3 Sep 2004 13:16:19 -0000 1.2
+++ firmware/rom.lds 4 Sep 2004 01:25:56 -0000
@@ -24,15 +24,14 @@
         . = _datastart + 0x200;
         *(.data)
         . = ALIGN(0x4);
- _dataend = .;
+ _dataend = .;
+ . = ALIGN(0x10); /* Maintain proper allocation for .text section */
     } > DRAM
     
- .datacopy :
- {
- . += SIZEOF(.data);
- } > FLASH
-
- .text :
+ /* TRICK ALERT! Newer versions of the linker don't allow output sections
+ to overlap even if one of them is empty, so advance the location pointer
+ "by hand" */
+ .text LOADADDR(.data) + SIZEOF(.data) :
     {
         *(.init.text)
         *(.text)
@@ -44,10 +43,6 @@
         *(.rodata)
         *(.rodata.str1.4)
         . = ALIGN(0x4);
- } > FLASH
-
- .iramcopy :
- {
         _iramcopy = .;
     } > FLASH
 




_______________________________________________
http://cool.haxx.se/mailman/listinfo/rockbox



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa