5 OUTPUT_FORMAT(elf32-m68k)
6 INPUT(target/coldfire/crt0.o)
8 OUTPUT_FORMAT(elf32-littlearm)
11 INPUT(target/arm/crt0-pp.o)
12 #elif CONFIG_CPU==DM320
13 INPUT(target/arm/tms320dm320/crt0.o)
14 #elif CONFIG_CPU==S3C2440
15 INPUT(target/arm/s3c2440/crt0.o)
16 #elif CONFIG_CPU == PNX0101
17 INPUT(target/arm/pnx0101/crt0-pnx0101.o)
18 #elif defined(CPU_ARM)
19 INPUT(target/arm/crt0.o)
22 OUTPUT_FORMAT(elf32-sh)
23 INPUT(target/sh/crt0.o)
26 #define PLUGINSIZE PLUGIN_BUFFER_SIZE
27 #define CODECSIZE CODEC_SIZE
30 #define STUBOFFSET 0x10000
35 #if CONFIG_CPU==S3C2440
37 #define DRAMSIZE (MEMORYSIZE * 0x100000) - 0x100 - PLUGINSIZE - STUBOFFSET - CODECSIZE - LCD_BUFFER_SIZE - TTB_SIZE
38 #elif CONFIG_CPU==DM320
40 #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE - LCD_BUFFER_SIZE - TTB_SIZE
42 #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE
45 #if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300)
46 #define DRAMORIG 0x31000000 + STUBOFFSET
47 #define IRAMORIG 0x10000000
48 #define IRAMSIZE 0xc000
49 #elif defined(IAUDIO_X5) || defined(IAUDIO_M5)
50 #define DRAMORIG 0x31000000 + STUBOFFSET
51 #define IRAMORIG 0x10000000
52 #define IRAMSIZE 0x10000
54 #define DRAMORIG 0x00000000 + STUBOFFSET
55 #define IRAMORIG 0x40000000
56 #define IRAMSIZE 0xc000
57 #elif CONFIG_CPU==PNX0101
58 #define DRAMORIG 0xc00000 + STUBOFFSET
59 #define IRAM0ORIG 0x000000
60 #define IRAM0SIZE 0x7000
61 #define IRAMORIG 0x400000
62 #define IRAMSIZE 0x7000
63 #elif CONFIG_CPU==S3C2440
64 #define DRAMORIG 0x00000100 + STUBOFFSET
65 #define IRAMORIG DRAMORIG
67 #define IRAMSIZE 0x1000
68 #elif CONFIG_CPU==DM320
69 #define DRAMORIG 0x00900000 + STUBOFFSET
70 #define IRAMORIG 0x00000000
71 #define IRAMSIZE 0x4000
72 #elif CONFIG_CPU==IMX31L
73 #define DRAMORIG (0x88000000 + STUBOFFSET)
74 #define IRAMORIG 0x1FFFC000
75 #define IRAMSIZE 0x4000
77 #define DRAMORIG 0x09000000 + STUBOFFSET
78 #define IRAMORIG 0x0f000000
79 #define IRAMSIZE 0x1000
82 /* End of the audio buffer, where the codec buffer starts */
83 #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE)
85 /* Where the codec buffer ends, and the plugin buffer starts */
86 #define ENDADDR (ENDAUDIOADDR + CODECSIZE)
90 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
91 #if CONFIG_CPU != S3C2440
92 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
94 #if CONFIG_CPU==PNX0101
95 IRAM0 : ORIGIN = IRAM0ORIG, LENGTH = IRAM0SIZE
101 #if (CONFIG_CPU==DM320)
116 *(.rodata) /* problems without this, dunno why */
122 /* Pseudo-allocate the copies of the data sections */
126 /* TRICK ALERT! For RAM execution, we put the .data section at the
127 same load address as the copy. Thus, we don't waste extra RAM
128 when we don't actually need the copy. */
129 .data : AT ( _datacopy )
149 _vectorscopy = LOADADDR(.vectors);
160 _iramcopy = LOADADDR(.iram);
178 .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram) + SIZEOF(.vectors):
187 #elif CONFIG_CPU==S3C2440
202 *(.rodata) /* problems without this, dunno why */
208 /* Pseudo-allocate the copies of the data sections */
212 /* TRICK ALERT! For RAM execution, we put the .data section at the
213 same load address as the copy. Thus, we don't waste extra RAM
214 when we don't actually need the copy. */
215 .data : AT ( _datacopy )
235 _vectorscopy = LOADADDR(.vectors);
246 _iramcopy = LOADADDR(.iram);
273 #else /* End CONFIG_CPU */
275 #if !defined(CPU_ARM)
280 KEEP(*(.resetvectors));
306 *(.rodata) /* problems without this, dunno why */
312 /* Pseudo-allocate the copies of the data sections */
316 /* TRICK ALERT! For RAM execution, we put the .data section at the
317 same load address as the copy. Thus, we don't waste extra RAM
318 when we don't actually need the copy. */
319 .data : AT ( _datacopy )
338 #if CONFIG_CPU==PNX0101
345 _vectorscopy = LOADADDR(.vectors);
348 #if CONFIG_CPU==PNX0101
349 .iram IRAMORIG + SIZEOF(.vectors) :
361 _iramcopy = LOADADDR(.iram);
371 #if defined(CPU_COLDFIRE) || defined(CPU_ARM)
377 cpu_idlestackbegin = .;
378 . += IDLE_STACK_SIZE;
379 cpu_idlestackend = .;
381 cop_idlestackbegin = .;
382 . += IDLE_STACK_SIZE;
383 cop_idlestackend = .;
396 /* TRICK ALERT! We want 0x2000 bytes of stack, but we set the section
397 size smaller, and allow the stack to grow into the .iram copy */
398 .stack ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram):
401 _stackbegin = . - SIZEOF(.iram);
402 . += 0x2000 - SIZEOF(.iram);
407 #if defined(CPU_COLDFIRE)
408 .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram):
409 #elif defined(CPU_ARM)
410 .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram) + SIZEOF(.vectors):
430 .audiobufend ENDAUDIOADDR: