summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-07-24 17:56:38 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-07-24 17:56:38 +0000
commit8aa84f4a6404d94dbd3d62aee50c18756c163dee (patch)
tree17debb02248dc77b449c90601282f1d3d819ba39
parent4b9cb9b5b4419207aca40040bd57a60d6e3734e1 (diff)
downloadrockbox-8aa84f4a6404d94dbd3d62aee50c18756c163dee.zip
rockbox-8aa84f4a6404d94dbd3d62aee50c18756c163dee.tar.gz
rockbox-8aa84f4a6404d94dbd3d62aee50c18756c163dee.tar.bz2
rockbox-8aa84f4a6404d94dbd3d62aee50c18756c163dee.tar.xz
Major fixes to please newer versions of the linker
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4936 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/app.lds58
1 files changed, 28 insertions, 30 deletions
diff --git a/firmware/app.lds b/firmware/app.lds
index bacc645..015ed70 100644
--- a/firmware/app.lds
+++ b/firmware/app.lds
@@ -104,39 +104,53 @@ SECTIONS
{
*(.resetvectors);
*(.vectors);
- . = ALIGN(0x200);
- *(.init.text)
} > DRAM
.text :
{
+ . = ALIGN(0x200);
+ *(.init.text)
*(.text)
. = ALIGN(0x4);
} > DRAM
- .data :
+ .rodata :
{
- *(.data)
+ *(.rodata)
+ *(.rodata.str1.4)
. = ALIGN(0x4);
- _datacopy = .; /* dummy here, only for ROM based */
- _datastart = .;
- _dataend = .;
+
+ /* Pseudo-allocate the copies of the data sections */
+ _datacopy = .;
} > DRAM
- .rodata :
+ /* TRICK ALERT! For RAM execution, we put the .data section at the
+ same load address as the copy. Thus, we don't waste extra RAM
+ when we don't actually need the copy. */
+ .data : AT ( _datacopy )
{
- *(.rodata)
- *(.rodata.str1.4)
+ _datastart = .;
+ *(.data)
. = ALIGN(0x4);
+ _dataend = .;
+ _iramcopy = .;
} > DRAM
- .stack :
+ .iram 0xf000000 : AT ( _iramcopy)
+ {
+ _iramstart = .;
+ *(.icode)
+ *(.idata)
+ _iramend = .;
+ } > IRAM
+
+ /* TRICK ALERT! We want 0x2000 bytes of stack, but we set the section
+ size smaller, and allow the stack to grow into the .iram copy */
+ .stack ADDR(.data)+SIZEOF(.data) + SIZEOF(.iram):
{
*(.stack)
_stackbegin = .;
- /* We put the copy of the .iram section here to save space */
- _iramcopy = .;
- . += 0x2000;
+ . += 0x2000-SIZEOF(.iram);
_stackend = .;
} > DRAM
@@ -148,15 +162,6 @@ SECTIONS
_end = .;
} > DRAM
-#ifdef DEBUG
- .heap :
- {
- _poolstart = .;
- . = 0x20000;
- _poolend = .;
- } > DRAM
-#endif
-
.mp3buf :
{
_mp3buffer = .;
@@ -172,12 +177,5 @@ SECTIONS
_pluginbuf = .;
}
- .iram 0xf000000 : AT ( _iramcopy )
- {
- _iramstart = .;
- *(.icode)
- *(.idata)
- _iramend = .;
- } > IRAM
#endif
}