3 /* These output formats should be in the config-files */
6 OUTPUT_FORMAT(elf32-m68k)
8 OUTPUT_FORMAT(elf32-littlearm)
10 OUTPUT_FORMAT(elf32-sh)
14 #define STUBOFFSET 0x10000
21 #define NOCACHE_BASE 0x10000000
23 #define NOCACHE_BASE 0x28000000
25 #define CACHEALIGN_SIZE 16
29 /* Default to no offset if target doesn't define this */
30 #define NOCACHE_BASE 0x00000000
33 #if CONFIG_CPU==DM320 || CONFIG_CPU==S3C2440
35 #define DRAMSIZE (MEMORYSIZE * 0x100000) - STUBOFFSET - PLUGIN_BUFFER_SIZE - CODEC_SIZE - LCD_BUFFER_SIZE - TTB_SIZE
36 #elif CONFIG_CPU==IMX31L
38 /* Reserve 1mb for LCD buffer/TTB as in app.lds */
39 #define DRAMSIZE (MEMORYSIZE * 0x100000 - 0x100000) - PLUGIN_BUFFER_SIZE - STUBOFFSET - CODEC_SIZE
41 #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGIN_BUFFER_SIZE - STUBOFFSET - CODEC_SIZE
44 #if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300)
48 #if defined(ARCH_IRIVER) || defined(IAUDIO_M3)
49 #define DRAMORIG 0x31000000
50 #define IRAMORIG 0x1000c000
51 #define IRAMSIZE 0xc000
52 #elif defined(IAUDIO_X5) || defined(IAUDIO_M5)
53 #define DRAMORIG 0x31000000
54 #define IRAMORIG 0x10010000
55 #define IRAMSIZE 0x10000
56 #elif CONFIG_CPU == PP5022 || CONFIG_CPU == PP5024
57 /* PP5022/24 have 128KB of IRAM */
58 #define DRAMORIG 0x00000000
59 #define IRAMORIG 0x4000c000
60 #define IRAMSIZE 0x14000
62 /* all other PP's have 96KB of IRAM */
63 #define DRAMORIG 0x00000000
64 #define IRAMORIG 0x4000c000
65 #define IRAMSIZE 0x0c000
66 #elif CONFIG_CPU == PNX0101
67 #define DRAMORIG 0xc00000 + STUBOFFSET
68 #define IRAMORIG 0x407000
69 #define IRAMSIZE 0x9000
70 #elif CONFIG_CPU == S3C2440
71 #define DRAMORIG 0x0 + STUBOFFSET
74 #elif CONFIG_CPU == IMX31L
75 #define DRAMORIG 0x0 + STUBOFFSET
78 #elif CONFIG_CPU==DM320
79 #define DRAMORIG 0x00900000 + STUBOFFSET
80 #define IRAMORIG DRAMORIG
81 #define IRAMSIZE 0x4000
83 #elif defined(CPU_TCC780X) || defined(CPU_TCC77X)
84 #define DRAMORIG 0x20000000
85 /*#define IRAMORIG 0x1000c000
86 #define IRAMSIZE 0xc000*/
89 #elif CONFIG_CPU==AS3525
91 #define IRAMSIZE 0x50000
92 #define DRAMORIG 0x30000000
94 #define DRAMORIG 0x09000000 + STUBOFFSET
97 #define PLUGIN_LENGTH PLUGIN_BUFFER_SIZE
99 #define CODEC_ORIGIN (DRAMORIG + (DRAMSIZE))
100 #define PLUGIN_ORIGIN (CODEC_ORIGIN + CODEC_SIZE)
103 #define THIS_LENGTH CODEC_SIZE
104 #define THIS_ORIGIN CODEC_ORIGIN
106 #define THIS_LENGTH PLUGIN_LENGTH
107 #define THIS_ORIGIN PLUGIN_ORIGIN
112 PLUGIN_RAM : ORIGIN = THIS_ORIGIN, LENGTH = THIS_LENGTH
113 #if defined(IRAMSIZE) && IRAMSIZE != 0
114 PLUGIN_IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
121 _plugin_start_addr = .;
122 plugin_start_addr = .;
129 #if defined(IRAMSIZE) && IRAMSIZE == 0
141 #if defined(IRAMSIZE) && IRAMSIZE == 0
150 #if defined(IRAMSIZE) && IRAMSIZE == 0
155 #if NOCACHE_BASE != 0
156 .ncdata . + NOCACHE_BASE :
158 . = ALIGN(CACHEALIGN_SIZE);
160 . = ALIGN(CACHEALIGN_SIZE);
164 #if defined(IRAMSIZE)
165 iramcopy = . - NOCACHE_BASE;
173 #if defined(IRAMSIZE) && IRAMSIZE != 0
174 .iram IRAMORIG : AT ( iramcopy)
195 plugin_bss_start = .;
197 #if defined(IRAMSIZE) && IRAMSIZE == 0
204 #if NOCACHE_BASE != 0
205 .ncbss . + NOCACHE_BASE (NOLOAD) :
207 . = ALIGN(CACHEALIGN_SIZE);
209 . = ALIGN(CACHEALIGN_SIZE);
214 .pluginend . - NOCACHE_BASE :
216 _plugin_end_addr = .;
220 /* Special trick to avoid a linker error when no other sections are
221 left after garbage collection (plugin not for this platform) */