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
19 #if CONFIG_CPU==S3C2440
21 #define DRAMSIZE (MEMORYSIZE * 0x100000) - 0x100 - PLUGIN_BUFFER_SIZE - STUBOFFSET - CODEC_SIZE - LCD_BUFFER_SIZE - TTB_SIZE
22 #elif CONFIG_CPU==DM320
24 #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGIN_BUFFER_SIZE - STUBOFFSET - CODEC_SIZE - LCD_BUFFER_SIZE - TTB_SIZE
25 #elif CONFIG_CPU==IMX31L
27 /* Reserve 1mb for LCD buffer/TTB as in app.lds */
28 #define DRAMSIZE (MEMORYSIZE * 0x100000 - 0x100000) - PLUGIN_BUFFER_SIZE - STUBOFFSET - CODEC_SIZE
30 #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGIN_BUFFER_SIZE - STUBOFFSET - CODEC_SIZE
33 #if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300)
37 #if defined(ARCH_IRIVER) || defined(IAUDIO_M3)
38 #define DRAMORIG 0x31000000
39 #define IRAMORIG 0x1000c000
40 #define IRAMSIZE 0xc000
41 #elif defined(IAUDIO_X5) || defined(IAUDIO_M5)
42 #define DRAMORIG 0x31000000
43 #define IRAMORIG 0x10010000
44 #define IRAMSIZE 0x10000
46 #define DRAMORIG 0x00000000
47 #define IRAMORIG 0x4000c000
48 #define IRAMSIZE 0xc000
49 #elif CONFIG_CPU == PNX0101
50 #define DRAMORIG 0xc00000 + STUBOFFSET
51 #define IRAMORIG 0x407000
52 #define IRAMSIZE 0x9000
53 #elif CONFIG_CPU == S3C2440
54 #define DRAMORIG 0x100 + STUBOFFSET
55 #define IRAMORIG DRAMORIG
58 #elif CONFIG_CPU == IMX31L
60 #define IRAMORIG 0x1FFFC000
61 #define IRAMSIZE 0x4000
62 #elif CONFIG_CPU==DM320
63 #define DRAMORIG 0x00900000 + STUBOFFSET
64 #define IRAMORIG DRAMORIG
65 #define IRAMSIZE 0x4000
67 #elif defined(CPU_TCC780X)
68 #define DRAMORIG 0x20000000
69 #define IRAMORIG 0x1000c000
70 #define IRAMSIZE 0xc000
72 #define DRAMORIG 0x09000000 + STUBOFFSET
75 #define PLUGIN_LENGTH PLUGIN_BUFFER_SIZE
77 #define CODEC_ORIGIN (DRAMORIG + (DRAMSIZE))
78 #define PLUGIN_ORIGIN (CODEC_ORIGIN + CODEC_SIZE)
81 #define THIS_LENGTH CODEC_SIZE
82 #define THIS_ORIGIN CODEC_ORIGIN
84 #define THIS_LENGTH PLUGIN_LENGTH
85 #define THIS_ORIGIN PLUGIN_ORIGIN
90 PLUGIN_RAM : ORIGIN = THIS_ORIGIN, LENGTH = THIS_LENGTH
92 PLUGIN_IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
99 _plugin_start_addr = .;
100 plugin_start_addr = .;
122 #if defined(IRAMSIZE)
132 #if defined(IRAMSIZE)
133 .iram IRAMORIG : AT ( iramcopy)
153 plugin_bss_start = .;
157 _plugin_end_addr = .;
161 /* Special trick to avoid a linker error when no other sections are
162 left after garbage collection (plugin not for this platform) */