5 OUTPUT_FORMAT(elf32-m68k)
6 INPUT(target/coldfire/crt0.o)
7 #elif CONFIG_CPU == TCC730
8 OUTPUT_FORMAT(elf32-calmrisc16)
10 #elif defined(CPU_ARM)
11 OUTPUT_FORMAT(elf32-littlearm)
14 INPUT(target/arm/crt0-pp.o)
15 #elif defined(CPU_ARM)
16 INPUT(target/arm/crt0.o)
19 OUTPUT_FORMAT(elf32-sh)
20 INPUT(target/sh/crt0.o)
23 #if CONFIG_CPU == TCC730
26 FIRMWARE : ORIGIN = LOADADDRESS, LENGTH = 256K
27 FLASH (RX) : ORIGIN = 0x000000, LENGTH = 1024K
28 ICMEM (RX) : ORIGIN = 0x3FC000, LENGTH = 32K
29 IMEM1 : ORIGIN = 0x200000, LENGTH = 32K
30 IMEM2 : ORIGIN = 0x210000, LENGTH = 16K
31 IMEM3 : ORIGIN = 0x220000, LENGTH = 32K
32 IMEM4 : ORIGIN = 0x230000, LENGTH = 16K
34 DRAM : ORIGIN = 0x000000, LENGTH = 0x3F0000
49 /* We start at 0x2000, to avoid overwriting Archos' loader datasegment.
50 * If it turns out that we won't call back the loader, this can be set to 0.
57 /* Data is put after BSS, to have all strings addresses > VIRT_PTR + VIRT_SIZE.
58 Strings are in rodata, so what we really assert is (.rodata > VIRT_PTR + VIRT_SIZE)
59 See settings.h for details */
82 _codesize = SIZEOF(.text);
84 _icodecopy = LOADADDR(.icode);
85 _icodestart = ADDR(.icode);
86 _icodesize = SIZEOF(.icode);
88 _datacopy = LOADADDR(.data);
89 _datastart = ADDR(.data);
90 _datasize = SIZEOF(.data);
93 _bssstart = ADDR(.bss);
94 _bsssize = (SIZEOF(.bss) + 1) & ~ 1;
96 _stackbegin = ADDR(.stack);
97 _stackend = ADDR(.stack) + SIZEOF(.stack);
99 _idatastart = ADDR(.idata);
101 /* FIXME: Where to put audio buffer? */
106 /* Plugins are not supported on the Gmini*/
113 #define PLUGINSIZE PLUGIN_BUFFER_SIZE
114 #define CODECSIZE CODEC_SIZE
118 #define STUBOFFSET 0x10000
123 #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE
125 #if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300)
126 #define DRAMORIG 0x31000000 + STUBOFFSET
127 #define IRAMORIG 0x10000000
128 #define IRAMSIZE 0xc000
129 #elif defined(IAUDIO_X5)
130 #define DRAMORIG 0x31000000 + STUBOFFSET
131 #define IRAMORIG 0x10000000
132 #define IRAMSIZE 0x14000
133 #elif (CONFIG_CPU==PP5002) || (CONFIG_CPU==PP5020)
134 #define DRAMORIG 0x00000000 + STUBOFFSET
135 #define IRAMORIG 0x40000000
136 #define IRAMSIZE 0xc000
137 #elif CONFIG_CPU==PNX0101
138 #define DRAMORIG 0xc00000 + STUBOFFSET
139 #define IRAMORIG 0x400000
140 #define IRAMSIZE 0x7000
141 #elif CONFIG_CPU==S3C2440
142 #define DRAMORIG 0x30000000 + STUBOFFSET
143 #define IRAMORIG 0x40000000
146 #define DRAMORIG 0x09000000 + STUBOFFSET
147 #define IRAMORIG 0x0f000000
148 #define IRAMSIZE 0x1000
151 /* End of the audio buffer, where the codec buffer starts */
152 #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE)
154 /* Where the codec buffer ends, and the plugin buffer starts */
155 #define ENDADDR (ENDAUDIOADDR + CODECSIZE)
159 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
160 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
161 #if CONFIG_CPU==PNX0101
162 IRAM0 : ORIGIN = 0x0, LENGTH = IRAMSIZE
173 KEEP(*(.resetvectors));
199 *(.rodata) /* problems without this, dunno why */
205 /* Pseudo-allocate the copies of the data sections */
209 /* TRICK ALERT! For RAM execution, we put the .data section at the
210 same load address as the copy. Thus, we don't waste extra RAM
211 when we don't actually need the copy. */
212 .data : AT ( _datacopy )
231 #if CONFIG_CPU==PNX0101
238 _vectorscopy = LOADADDR(.vectors);
241 #if CONFIG_CPU==PNX0101
242 .iram IRAMORIG + SIZEOF(.vectors) :
254 _iramcopy = LOADADDR(.iram);
264 #if defined(CPU_COLDFIRE) || defined(CPU_ARM)
284 /* TRICK ALERT! We want 0x2000 bytes of stack, but we set the section
285 size smaller, and allow the stack to grow into the .iram copy */
286 .stack ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram):
289 _stackbegin = . - SIZEOF(.iram);
290 . += 0x2000 - SIZEOF(.iram);
295 #if defined(CPU_COLDFIRE)
296 .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram):
297 #elif defined(CPU_ARM)
298 .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram) + SIZEOF(.vectors):
316 .audiobufend ENDAUDIOADDR: