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
33 #define DRAMSIZE (MEMORYSIZE * 0x100000) - 0x100 - PLUGINSIZE - STUBOFFSET - CODECSIZE - LCD_BUFFER_SIZE - TTB_SIZE
35 #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE
38 #if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300)
39 #define DRAMORIG 0x31000000 + STUBOFFSET
40 #define IRAMORIG 0x10000000
41 #define IRAMSIZE 0xc000
42 #elif defined(IAUDIO_X5) || defined(IAUDIO_M5)
43 #define DRAMORIG 0x31000000 + STUBOFFSET
44 #define IRAMORIG 0x10000000
45 #define IRAMSIZE 0x10000
47 #define DRAMORIG 0x00000000 + STUBOFFSET
48 #define IRAMORIG 0x40000000
49 #define IRAMSIZE 0xc000
50 #elif CONFIG_CPU==PNX0101
51 #define DRAMORIG 0xc00000 + STUBOFFSET
52 #define IRAMORIG 0x400000
53 #define IRAMSIZE 0x7000
54 #elif CONFIG_CPU==S3C2440
55 #define DRAMORIG 0x00000100 + STUBOFFSET
56 #define IRAMORIG DRAMORIG
57 #define IRAMSIZE 0x1000
59 #elif CONFIG_CPU==DM320
60 #define DRAMORIG 0x00900000 + STUBOFFSET
61 #define IRAMORIG 0x00000000
62 #define IRAMSIZE 0x4000
63 #elif CONFIG_CPU==IMX31L
64 #define DRAMORIG (0x80000000 + STUBOFFSET)
65 #define IRAMORIG 0x1FFFC000
66 #define IRAMSIZE 0x4000
68 #define DRAMORIG 0x09000000 + STUBOFFSET
69 #define IRAMORIG 0x0f000000
70 #define IRAMSIZE 0x1000
73 /* End of the audio buffer, where the codec buffer starts */
74 #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE)
76 /* Where the codec buffer ends, and the plugin buffer starts */
77 #define ENDADDR (ENDAUDIOADDR + CODECSIZE)
81 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
82 #if CONFIG_CPU != S3C2440
83 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
85 #if CONFIG_CPU==PNX0101
86 IRAM0 : ORIGIN = 0x0, LENGTH = IRAMSIZE
97 KEEP(*(.resetvectors));
123 *(.rodata) /* problems without this, dunno why */
129 /* Pseudo-allocate the copies of the data sections */
133 /* TRICK ALERT! For RAM execution, we put the .data section at the
134 same load address as the copy. Thus, we don't waste extra RAM
135 when we don't actually need the copy. */
136 .data : AT ( _datacopy )
155 #if CONFIG_CPU==PNX0101
162 _vectorscopy = LOADADDR(.vectors);
165 #if CONFIG_CPU==PNX0101
166 .iram IRAMORIG + SIZEOF(.vectors) :
167 #elif CONFIG_CPU==S3C2440
180 _iramcopy = LOADADDR(.iram);
190 #if defined(CPU_COLDFIRE) || defined(CPU_ARM)
204 cpu_idlestackbegin = .;
206 cpu_idlestackend = .;
207 cop_idlestackbegin = .;
209 cop_idlestackend = .;
223 /* TRICK ALERT! We want 0x2000 bytes of stack, but we set the section
224 size smaller, and allow the stack to grow into the .iram copy */
225 .stack ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram):
228 _stackbegin = . - SIZEOF(.iram);
229 . += 0x2000 - SIZEOF(.iram);
234 #if defined(CPU_COLDFIRE)
235 .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram):
236 #elif defined(CPU_ARM) && CONFIG_CPU != S3C2440
237 .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram) + SIZEOF(.vectors):
255 .audiobufend ENDAUDIOADDR: