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==IMX31L
44 /* Subtract 1MB for the FRAME/TTB section */
45 #define DRAMSIZE (MEMORYSIZE * 0x100000 - 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE
46 #elif CONFIG_CPU==DM320
48 #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE - LCD_BUFFER_SIZE - TTB_SIZE
50 #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE
53 #if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300)
54 #define DRAMORIG 0x31000000 + STUBOFFSET
55 #define IRAMORIG 0x10000000
56 #define IRAMSIZE 0xc000
57 #elif defined(IAUDIO_X5) || defined(IAUDIO_M5)
58 #define DRAMORIG 0x31000000 + STUBOFFSET
59 #define IRAMORIG 0x10000000
60 #define IRAMSIZE 0x10000
62 #define DRAMORIG 0x00000000 + STUBOFFSET
63 #define IRAMORIG 0x40000000
64 #define IRAMSIZE 0xc000
65 #elif CONFIG_CPU==PNX0101
66 #define DRAMORIG 0xc00000 + STUBOFFSET
67 #define IRAM0ORIG 0x000000
68 #define IRAM0SIZE 0x7000
69 #define IRAMORIG 0x400000
70 #define IRAMSIZE 0x7000
71 #elif CONFIG_CPU==S3C2440
72 #define DRAMORIG 0x00000100 + STUBOFFSET
73 #define IRAMORIG DRAMORIG
75 #define IRAMSIZE 0x1000
76 #elif CONFIG_CPU==DM320
77 #define DRAMORIG 0x00900000 + STUBOFFSET
78 #define IRAMORIG 0x00000000
79 #define IRAMSIZE 0x4000
80 #elif CONFIG_CPU==IMX31L
81 #define DRAMORIG (0x0 + STUBOFFSET)
82 /* #define IRAMORIG 0x1FFFC000 */
83 #define IRAMORIG DRAMORIG
85 #define IRAMSIZE 0x4000
86 #elif defined(CPU_TCC780X)
87 #define DRAMORIG 0x20000000 + STUBOFFSET
88 #define ITCMORIG 0x00000000
89 #define ITCMSIZE 0x1000
90 #define DTCMORIG 0xA0000000
91 #define DTCMSIZE 0x2000
92 #define SRAMORIG 0x10000000
93 #define SRAMSIZE 0xc000
95 #define DRAMORIG 0x09000000 + STUBOFFSET
96 #define IRAMORIG 0x0f000000
97 #define IRAMSIZE 0x1000
100 /* End of the audio buffer, where the codec buffer starts */
101 #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE)
103 /* Where the codec buffer ends, and the plugin buffer starts */
104 #define ENDADDR (ENDAUDIOADDR + CODECSIZE)
108 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
109 #if defined(CPU_TCC780X)
110 /* Seperate data & instruction TCMs plus SRAM. */
111 ITCM : ORIGIN = ITCMORIG, LENGTH = ITCMSIZE
112 DTCM : ORIGIN = DTCMORIG, LENGTH = DTCMSIZE
113 SRAM : ORIGIN = SRAMORIG, LENGTH = SRAMSIZE
114 #elif CONFIG_CPU != S3C2440 && CONFIG_CPU != IMX31L
115 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
117 #if CONFIG_CPU==PNX0101
118 IRAM0 : ORIGIN = IRAM0ORIG, LENGTH = IRAM0SIZE
124 #if (CONFIG_CPU==DM320)
139 *(.rodata) /* problems without this, dunno why */
145 /* Pseudo-allocate the copies of the data sections */
149 /* TRICK ALERT! For RAM execution, we put the .data section at the
150 same load address as the copy. Thus, we don't waste extra RAM
151 when we don't actually need the copy. */
152 .data : AT ( _datacopy )
172 _vectorscopy = LOADADDR(.vectors);
184 _iramcopy = LOADADDR(.iram);
202 .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram) + SIZEOF(.vectors):
211 #elif defined(CPU_TCC780X)
226 *(.rodata) /* problems without this, dunno why */
232 /* Pseudo-allocate the copies of the data sections */
236 /* TRICK ALERT! For RAM execution, we put the .data section at the
237 same load address as the copy. Thus, we don't waste extra RAM
238 when we don't actually need the copy. */
239 .data : AT ( _datacopy )
259 _vectorscopy = LOADADDR(.vectors);
267 _itcmcopy = LOADADDR(.itcm);
275 _dtcmcopy = LOADADDR(.dtcm);
287 _iramcopy = LOADADDR(.iram);
314 #elif CONFIG_CPU==S3C2440 || CONFIG_CPU == IMX31L
329 *(.rodata) /* problems without this, dunno why */
335 /* Pseudo-allocate the copies of the data sections */
339 /* TRICK ALERT! For RAM execution, we put the .data section at the
340 same load address as the copy. Thus, we don't waste extra RAM
341 when we don't actually need the copy. */
342 .data : AT ( _datacopy )
362 _vectorscopy = LOADADDR(.vectors);
373 _iramcopy = LOADADDR(.iram);
400 #else /* End CONFIG_CPU */
402 #if !defined(CPU_ARM)
407 KEEP(*(.resetvectors));
433 *(.rodata) /* problems without this, dunno why */
439 /* Pseudo-allocate the copies of the data sections */
443 /* TRICK ALERT! For RAM execution, we put the .data section at the
444 same load address as the copy. Thus, we don't waste extra RAM
445 when we don't actually need the copy. */
446 .data : AT ( _datacopy )
465 #if CONFIG_CPU==PNX0101
472 _vectorscopy = LOADADDR(.vectors);
475 #if CONFIG_CPU==PNX0101
476 .iram IRAMORIG + SIZEOF(.vectors) :
488 _iramcopy = LOADADDR(.iram);
498 #if defined(CPU_COLDFIRE) || defined(CPU_ARM)
504 cpu_idlestackbegin = .;
505 . += IDLE_STACK_SIZE;
506 cpu_idlestackend = .;
508 cop_idlestackbegin = .;
509 . += IDLE_STACK_SIZE;
510 cop_idlestackend = .;
523 /* TRICK ALERT! We want 0x2000 bytes of stack, but we set the section
524 size smaller, and allow the stack to grow into the .iram copy */
525 .stack ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram):
528 _stackbegin = . - SIZEOF(.iram);
529 . += 0x2000 - SIZEOF(.iram);
534 #if defined(CPU_COLDFIRE)
535 .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram):
536 #elif defined(CPU_ARM)
537 .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram) + SIZEOF(.vectors):
557 .audiobufend ENDAUDIOADDR: