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 == PNX0101
13 INPUT(target/arm/pnx0101/crt0-pnx0101.o)
14 #elif defined(CPU_ARM)
15 INPUT(target/arm/crt0.o)
18 OUTPUT_FORMAT(elf32-sh)
19 INPUT(target/sh/crt0.o)
22 #define PLUGINSIZE PLUGIN_BUFFER_SIZE
23 #define CODECSIZE CODEC_SIZE
26 #define STUBOFFSET 0x10000
31 #if CONFIG_CPU!=S3C2440
32 #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE
34 #if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300)
35 #define DRAMORIG 0x31000000 + STUBOFFSET
36 #define IRAMORIG 0x10000000
37 #define IRAMSIZE 0xc000
38 #elif defined(IAUDIO_X5) || defined(IAUDIO_M5)
39 #define DRAMORIG 0x31000000 + STUBOFFSET
40 #define IRAMORIG 0x10000000
41 #define IRAMSIZE 0x10000
43 #define DRAMORIG 0x00000000 + STUBOFFSET
44 #define IRAMORIG 0x40000000
45 #define IRAMSIZE 0xc000
46 #elif CONFIG_CPU==PNX0101
47 #define DRAMORIG 0xc00000 + STUBOFFSET
48 #define IRAMORIG 0x400000
49 #define IRAMSIZE 0x7000
50 #elif CONFIG_CPU==S3C2440
52 #define DRAMORIG (0x100 + STUBOFFSET)
53 #define DRAMSIZE (MEMORYSIZE * 0x100000) - 0x100 - STUBOFFSET - LCD_BUFFER_SIZE - TTB_SIZE - PLUGINSIZE - CODECSIZE
54 #define IRAMORIG DRAMORIG
58 #define DRAMORIG 0x09000000 + STUBOFFSET
59 #define IRAMORIG 0x0f000000
60 #define IRAMSIZE 0x1000
63 /* End of the audio buffer, where the codec buffer starts */
64 #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE)
66 /* Where the codec buffer ends, and the plugin buffer starts */
67 #define ENDADDR (ENDAUDIOADDR + CODECSIZE)
71 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
72 #if CONFIG_CPU != S3C2440
73 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
75 #if CONFIG_CPU==PNX0101
76 IRAM0 : ORIGIN = 0x0, LENGTH = IRAMSIZE
87 KEEP(*(.resetvectors));
113 *(.rodata) /* problems without this, dunno why */
119 /* Pseudo-allocate the copies of the data sections */
123 /* TRICK ALERT! For RAM execution, we put the .data section at the
124 same load address as the copy. Thus, we don't waste extra RAM
125 when we don't actually need the copy. */
126 .data : AT ( _datacopy )
145 #if CONFIG_CPU==PNX0101
152 _vectorscopy = LOADADDR(.vectors);
155 #if CONFIG_CPU==PNX0101
156 .iram IRAMORIG + SIZEOF(.vectors) :
157 #elif CONFIG_CPU==S3C2440
170 _iramcopy = LOADADDR(.iram);
180 #if defined(CPU_COLDFIRE) || defined(CPU_ARM)
200 /* TRICK ALERT! We want 0x2000 bytes of stack, but we set the section
201 size smaller, and allow the stack to grow into the .iram copy */
202 .stack ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram):
205 _stackbegin = . - SIZEOF(.iram);
206 . += 0x2000 - SIZEOF(.iram);
211 #if defined(CPU_COLDFIRE)
212 .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram):
213 #elif defined(CPU_ARM) && CONFIG_CPU != S3C2440
214 .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram) + SIZEOF(.vectors):
232 .audiobufend ENDAUDIOADDR: