5 OUTPUT_FORMAT(elf32-m68k)
6 INPUT(target/coldfire/crt0.o)
7 #elif defined (CPU_ARM)
8 OUTPUT_FORMAT(elf32-littlearm)
11 INPUT(target/arm/crt0-pp-bl.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_TCC77X)
17 INPUT(target/arm/tcc77x/crt0.o)
18 #elif defined(CPU_TCC780X)
19 INPUT(target/arm/tcc780x/crt0.o)
20 #elif CONFIG_CPU==IMX31L
21 INPUT(target/arm/imx31/crt0.o)
23 INPUT(target/arm/crt0.o)
26 OUTPUT_FORMAT(elf32-sh)
27 INPUT(target/sh/crt0.o)
30 #define DRAMSIZE (MEMORYSIZE * 0x100000)
32 #ifdef IRIVER_H100_SERIES
33 #define DRAMORIG 0x31000000
34 #define IRAMORIG 0x10000000
35 #define IRAMSIZE 0x18000
36 #define FLASHORIG 0x001f0000
38 #elif defined(IRIVER_H300_SERIES)
39 #define DRAMORIG 0x31000000
40 #define IRAMORIG 0x10000000
41 #define IRAMSIZE 0x18000
42 #define FLASHORIG 0x003f0000
44 #elif defined(IAUDIO_X5) || defined(IAUDIO_M5)
45 #define DRAMORIG 0x31000000
46 #define IRAMORIG 0x10000000
47 #define IRAMSIZE 0x20000
48 #define FLASHORIG 0x00010000
50 #elif defined(IAUDIO_M3)
51 #define DRAMORIG 0x31000000
52 #define IRAMORIG 0x10000000
53 #define IRAMSIZE 0x18000
54 #define FLASHORIG 0x00010000
56 #elif CONFIG_CPU == PP5020
57 #define DRAMORIG 0x10000000
58 #define IRAMORIG 0x40000000
59 #define IRAMSIZE 0x18000
60 #define FLASHORIG 0x001f0000
62 #elif (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024)
63 #define DRAMORIG 0x10000000
65 #define IRAMORIG 0x40000000
67 #define IRAMSIZE 0x20000
68 #define FLASHORIG 0x001f0000
70 #elif CONFIG_CPU == S3C2440
71 #define DRAMORIG 0x30000000
72 #define IRAMORIG 0x40000000
74 #define FLASHORIG 0x0000000
76 #elif CONFIG_CPU == DM320
77 #define DRAMORIG 0x00900000
78 #define IRAMORIG 0x00000000
80 #define FLASHORIG 0x00100000
82 #elif CONFIG_CPU == PP5002
83 #define DRAMORIG 0x28000000
84 #define IRAMORIG 0x40000000
85 #define IRAMSIZE 0x18000
86 #define FLASHORIG 0x001f0000
88 #elif CONFIG_CPU == IMX31L
89 #define DRAMORIG (0x02000000-0x00100000)
91 #define DRAMSIZE (1 << 20) /* Limit 1 MB for bootloader */
93 #define IRAMORIG 0x1FFFC000
95 #define FLASHORIG 0x0000000
97 #elif defined(CPU_TCC77X)
98 #define DRAMORIG 0x20000000
99 #define IRAMORIG 0x00000000
101 #define FLASHORIG 0x0000000
103 #elif defined(CPU_TCC780X)
104 #define DRAMORIG 0x20000000
105 #define IRAMORIG 0x00000000
107 #define FLASHORIG 0x0000000
110 #define DRAMORIG 0x09000000
111 #define IRAMORIG 0x0f000000
112 #define IRAMSIZE 0x1000
113 #define FLASHORIG 0x02000000 + ROM_START
114 #define FLASHSIZE 256K - ROM_START
117 #if defined(CPU_TCC77X) || defined(CPU_TCC780X)
121 DRAM : ORIGIN = DRAMORIG + DRAMSIZE - 0x100000, LENGTH = 0x100000
123 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
125 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
127 #elif CONFIG_CPU == IMX31L
130 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
132 #elif !defined(CPU_PP) && (CONFIG_CPU!=S3C2440)
135 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
136 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
137 FLASH : ORIGIN = FLASHORIG, LENGTH = FLASHSIZE
169 /* The bss section is too large for IRAM - we just move it 16MB into the
172 . = (DRAMORIG+16*1024*1024);
180 #elif (CONFIG_CPU==S3C2440)
182 . = DRAMORIG + 0x1000000;
215 #elif defined(CPU_TCC77X) || defined(CPU_TCC780X)
252 #elif (CONFIG_CPU==DM320)
254 . = DRAMORIG + 0x1000000;
268 *(.rodata) /* problems without this, dunno why */
274 /* Pseudo-allocate the copies of the data sections */
309 KEEP(*(.resetvectors));
315 _vectorscopy = LOADADDR(.vectors);
317 #elif (CONFIG_CPU==IMX31L)
333 *(.rodata) /* problems without this, dunno why */
339 /* Pseudo-allocate the copies of the data sections */
378 _vectorscopy = LOADADDR(.vectors);
384 #if defined(IAUDIO_X5) || defined(IAUDIO_M5) || defined(IAUDIO_M3)
390 .data : AT ( _datacopy )
393 KEEP(*(.resetvectors));
404 . = ALIGN(0x10); /* Maintain proper alignment for .text section */
407 /* TRICK ALERT! Newer versions of the linker don't allow output sections
408 to overlap even if one of them is empty, so advance the location pointer
410 .text LOADADDR(.data) + SIZEOF(.data) :
434 #if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300_SERIES) \
435 || defined(IAUDIO_X5) || defined(IAUDIO_M5) || defined(IAUDIO_M3)
436 .bss DRAMORIG+0x800000:
446 #if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300_SERIES) \
447 || defined(IAUDIO_X5) || defined(IAUDIO_M5) || defined(IAUDIO_M3)