diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2009-02-20 02:33:40 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2009-02-20 02:33:40 +0000 |
commit | ec67912b638e0fae3cae7b4182d23db6d36c5135 (patch) | |
tree | 8101f45d02947a828d20174a45d1a6d19fafa3b2 /firmware/target/sh/archos/app.lds | |
parent | 07ae1e4fb9a1fd9d6ce9c48c5300b53e87303937 (diff) | |
download | rockbox-ec67912b638e0fae3cae7b4182d23db6d36c5135.tar.gz rockbox-ec67912b638e0fae3cae7b4182d23db6d36c5135.zip |
Reclaim .iram areas in DRAM by overlapping their load addresses with the uninitialized data sections. I did what I could test out-- not any flash image linker scripts or other target processors. Move any .iram copies in crt0.S's to be the first operation even if not _strictly_ necessary to be emphatic (aka. 'beware').
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20061 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/sh/archos/app.lds')
-rw-r--r-- | firmware/target/sh/archos/app.lds | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/firmware/target/sh/archos/app.lds b/firmware/target/sh/archos/app.lds index 02ed6bef77..225f11f705 100644 --- a/firmware/target/sh/archos/app.lds +++ b/firmware/target/sh/archos/app.lds | |||
@@ -90,6 +90,7 @@ SECTIONS | |||
90 | } > IRAM AT> DRAM | 90 | } > IRAM AT> DRAM |
91 | 91 | ||
92 | _iramcopy = LOADADDR(.iram); | 92 | _iramcopy = LOADADDR(.iram); |
93 | _noloaddram = LOADADDR(.iram); | ||
93 | 94 | ||
94 | .ibss (NOLOAD) : | 95 | .ibss (NOLOAD) : |
95 | { | 96 | { |
@@ -98,18 +99,16 @@ SECTIONS | |||
98 | . = ALIGN(0x4); | 99 | . = ALIGN(0x4); |
99 | _iend = .; | 100 | _iend = .; |
100 | } > IRAM | 101 | } > IRAM |
101 | 102 | ||
102 | /* TRICK ALERT! We want 0x2000 bytes of stack, but we set the section | 103 | .stack _noloaddram (NOLOAD) : |
103 | size smaller, and allow the stack to grow into the .iram copy */ | ||
104 | .stack ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram): | ||
105 | { | 104 | { |
106 | *(.stack) | 105 | *(.stack) |
107 | _stackbegin = . - SIZEOF(.iram); | 106 | _stackbegin = .; |
108 | . += 0x2000 - SIZEOF(.iram); | 107 | . += 0x2000; |
109 | _stackend = .; | 108 | _stackend = .; |
110 | } > DRAM | 109 | } > DRAM |
111 | 110 | ||
112 | .bss : | 111 | .bss (NOLOAD) : |
113 | { | 112 | { |
114 | _edata = .; | 113 | _edata = .; |
115 | *(.bss*) | 114 | *(.bss*) |
@@ -118,25 +117,26 @@ SECTIONS | |||
118 | _end = .; | 117 | _end = .; |
119 | } > DRAM | 118 | } > DRAM |
120 | 119 | ||
121 | .audiobuf ALIGN(4) : | 120 | .audiobuf (NOLOAD) : |
122 | { | 121 | { |
122 | . = ALIGN(4); | ||
123 | _audiobuffer = .; | 123 | _audiobuffer = .; |
124 | audiobuffer = .; | 124 | audiobuffer = .; |
125 | } > DRAM | 125 | } > DRAM |
126 | 126 | ||
127 | .audiobufend ENDAUDIOADDR: | 127 | .audiobufend ENDAUDIOADDR (NOLOAD) : |
128 | { | 128 | { |
129 | audiobufend = .; | 129 | audiobufend = .; |
130 | _audiobufend = .; | 130 | _audiobufend = .; |
131 | } > DRAM | 131 | } > DRAM |
132 | 132 | ||
133 | .codec ENDAUDIOADDR: | 133 | .codec ENDAUDIOADDR (NOLOAD) : |
134 | { | 134 | { |
135 | codecbuf = .; | 135 | codecbuf = .; |
136 | _codecbuf = .; | 136 | _codecbuf = .; |
137 | } | 137 | } |
138 | 138 | ||
139 | .plugin ENDADDR: | 139 | .plugin ENDADDR (NOLOAD) : |
140 | { | 140 | { |
141 | _pluginbuf = .; | 141 | _pluginbuf = .; |
142 | pluginbuf = .; | 142 | pluginbuf = .; |