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 defined(CPU_TCC780X)
17 INPUT(target/arm/tcc780x/crt0.o)
18 #elif CONFIG_CPU == PNX0101
19 INPUT(target/arm/pnx0101/crt0-pnx0101.o)
20 #elif CONFIG_CPU == IMX31L
21 INPUT(target/arm/imx31/crt0.o)
22 #elif defined(CPU_ARM)
23 INPUT(target/arm/crt0.o)
26 OUTPUT_FORMAT(elf32-sh)
27 INPUT(target/sh/crt0.o)
30 #define PLUGINSIZE PLUGIN_BUFFER_SIZE
31 #define CODECSIZE CODEC_SIZE
34 #define STUBOFFSET 0x10000
39 #if CONFIG_CPU==S3C2440
41 #define DRAMSIZE (MEMORYSIZE * 0x100000) - 0x100 - PLUGINSIZE - STUBOFFSET - CODECSIZE - LCD_BUFFER_SIZE - TTB_SIZE
42 #elif CONFIG_CPU==DM320
44 #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE - LCD_BUFFER_SIZE - TTB_SIZE
46 #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE
49 #if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300)
50 #define DRAMORIG 0x31000000 + STUBOFFSET
51 #define IRAMORIG 0x10000000
52 #define IRAMSIZE 0xc000
53 #elif defined(IAUDIO_X5) || defined(IAUDIO_M5)
54 #define DRAMORIG 0x31000000 + STUBOFFSET
55 #define IRAMORIG 0x10000000
56 #define IRAMSIZE 0x10000
58 #define DRAMORIG 0x00000000 + STUBOFFSET
59 #define IRAMORIG 0x40000000
60 #define IRAMSIZE 0xc000
61 #elif CONFIG_CPU==PNX0101
62 #define DRAMORIG 0xc00000 + STUBOFFSET
63 #define IRAM0ORIG 0x000000
64 #define IRAM0SIZE 0x7000
65 #define IRAMORIG 0x400000
66 #define IRAMSIZE 0x7000
67 #elif CONFIG_CPU==S3C2440
68 #define DRAMORIG 0x00000100 + STUBOFFSET
69 #define IRAMORIG DRAMORIG
71 #define IRAMSIZE 0x1000
72 #elif CONFIG_CPU==DM320
73 #define DRAMORIG 0x00900000 + STUBOFFSET
74 #define IRAMORIG 0x00000000
75 #define IRAMSIZE 0x4000
76 #elif CONFIG_CPU==IMX31L
77 #define DRAMORIG (0x0 + STUBOFFSET)
78 #define IRAMORIG 0x1FFFC000
79 #define IRAMSIZE 0x4000
80 #elif defined(CPU_TCC780X)
81 #define DRAMORIG 0x20000000 + STUBOFFSET
82 #define ITCMORIG 0x00000000
83 #define ITCMSIZE 0x1000
84 #define DTCMORIG 0xA0000000
85 #define DTCMSIZE 0x2000
86 #define SRAMORIG 0x10000000
87 #define SRAMSIZE 0xc000
89 #define DRAMORIG 0x09000000 + STUBOFFSET
90 #define IRAMORIG 0x0f000000
91 #define IRAMSIZE 0x1000
94 /* End of the audio buffer, where the codec buffer starts */
95 #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE)
97 /* Where the codec buffer ends, and the plugin buffer starts */
98 #define ENDADDR (ENDAUDIOADDR + CODECSIZE)
102 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
103 #if defined(CPU_TCC780X)
104 /* Seperate data & instruction TCMs plus SRAM. */
105 ITCM : ORIGIN = ITCMORIG, LENGTH = ITCMSIZE
106 DTCM : ORIGIN = DTCMORIG, LENGTH = DTCMSIZE
107 SRAM : ORIGIN = SRAMORIG, LENGTH = SRAMSIZE
108 #elif CONFIG_CPU != S3C2440
109 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
111 #if CONFIG_CPU==PNX0101
112 IRAM0 : ORIGIN = IRAM0ORIG, LENGTH = IRAM0SIZE
118 #if (CONFIG_CPU==DM320)
133 *(.rodata) /* problems without this, dunno why */
139 /* Pseudo-allocate the copies of the data sections */
143 /* TRICK ALERT! For RAM execution, we put the .data section at the
144 same load address as the copy. Thus, we don't waste extra RAM
145 when we don't actually need the copy. */
146 .data : AT ( _datacopy )
166 _vectorscopy = LOADADDR(.vectors);
178 _iramcopy = LOADADDR(.iram);
196 .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram) + SIZEOF(.vectors):
205 #elif defined(CPU_TCC780X)
220 *(.rodata) /* problems without this, dunno why */
226 /* Pseudo-allocate the copies of the data sections */
230 /* TRICK ALERT! For RAM execution, we put the .data section at the
231 same load address as the copy. Thus, we don't waste extra RAM
232 when we don't actually need the copy. */
233 .data : AT ( _datacopy )
253 _vectorscopy = LOADADDR(.vectors);
262 _itcmcopy = LOADADDR(.itcm);
272 _dtcmcopy = LOADADDR(.dtcm);
299 #elif CONFIG_CPU==S3C2440
314 *(.rodata) /* problems without this, dunno why */
320 /* Pseudo-allocate the copies of the data sections */
324 /* TRICK ALERT! For RAM execution, we put the .data section at the
325 same load address as the copy. Thus, we don't waste extra RAM
326 when we don't actually need the copy. */
327 .data : AT ( _datacopy )
347 _vectorscopy = LOADADDR(.vectors);
358 _iramcopy = LOADADDR(.iram);
385 #else /* End CONFIG_CPU */
387 #if !defined(CPU_ARM)
392 KEEP(*(.resetvectors));
418 *(.rodata) /* problems without this, dunno why */
424 /* Pseudo-allocate the copies of the data sections */
428 /* TRICK ALERT! For RAM execution, we put the .data section at the
429 same load address as the copy. Thus, we don't waste extra RAM
430 when we don't actually need the copy. */
431 .data : AT ( _datacopy )
450 #if CONFIG_CPU==PNX0101
457 _vectorscopy = LOADADDR(.vectors);
460 #if CONFIG_CPU==PNX0101
461 .iram IRAMORIG + SIZEOF(.vectors) :
473 _iramcopy = LOADADDR(.iram);
483 #if defined(CPU_COLDFIRE) || defined(CPU_ARM)
489 cpu_idlestackbegin = .;
490 . += IDLE_STACK_SIZE;
491 cpu_idlestackend = .;
493 cop_idlestackbegin = .;
494 . += IDLE_STACK_SIZE;
495 cop_idlestackend = .;
508 /* TRICK ALERT! We want 0x2000 bytes of stack, but we set the section
509 size smaller, and allow the stack to grow into the .iram copy */
510 .stack ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram):
513 _stackbegin = . - SIZEOF(.iram);
514 . += 0x2000 - SIZEOF(.iram);
519 #if defined(CPU_COLDFIRE)
520 .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram):
521 #elif defined(CPU_ARM)
522 .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram) + SIZEOF(.vectors):
542 .audiobufend ENDAUDIOADDR: