FS#8961 - Anti-Aliased Fonts.
[kugel-rb.git] / firmware / target / arm / as3525 / app.lds
blobeb5b28f85240ea0b63b9cb3e8832ae2532291268
1 #include "config.h"
2 #include "cpu.h"
4 ENTRY(start)
6 OUTPUT_FORMAT(elf32-littlearm)
7 OUTPUT_ARCH(arm)
8 STARTUP(target/arm/crt0.o)
10 #define PLUGINSIZE PLUGIN_BUFFER_SIZE
11 #define CODECSIZE CODEC_SIZE
13 #ifdef DEBUG
14 #define STUBOFFSET 0x10000
15 #else
16 #define STUBOFFSET 0
17 #endif
20 #define IRAMORIG IRAM_ORIG
21 #define DRAMORIG (DRAM_ORIG + STUBOFFSET)
23 /* End of the audio buffer, where the codec buffer starts */
24 #define ENDAUDIOADDR  (DRAMORIG + DRAMSIZE)
27 #ifdef AMS_LOWMEM
28 #define DRAMSIZE (DRAM_SIZE - STUBOFFSET - PLUGINSIZE - TTB_SIZE)
29 #define CODECORIG (IRAMORIG + (IRAM_SIZE - CODEC_SIZE))
30 #define IRAMSIZE (IRAM_SIZE - CODEC_SIZE)
31 #else
32 #define DRAMSIZE (DRAM_SIZE - STUBOFFSET - PLUGINSIZE - CODECSIZE - TTB_SIZE)
33 #define CODECORIG (ENDAUDIOADDR)
34 #define IRAMSIZE (0x20000)
35 #endif
38 /* Where the codec buffer ends, and the plugin buffer starts */
39 #ifdef AMS_LOWMEM
40 #define ENDADDR (ENDAUDIOADDR)
41 #else
42 #define ENDADDR (ENDAUDIOADDR + CODECSIZE)
43 #endif
45 MEMORY
47 #ifdef AMS_LOWMEM
48     CODEC_IRAM : ORIGIN = CODECORIG, LENGTH = CODEC_SIZE
49 #endif
50     IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
51     DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
54 SECTIONS
56     loadaddress = DRAM_ORIG;
58     .vectors :
59     {
60         _vectors_start = .;
61         *(.init.text)
62     } > DRAM
64     .text :
65     {
66         _loadaddress = .;
67         _textstart = .;
68         *(.text)
69         *(.text*)
70         *(.glue_7)
71         *(.glue_7t)
72         . = ALIGN(0x4);
73     } > DRAM
75     .rodata :
76     {
77         *(.rodata*)
78         . = ALIGN(0x4);
79     } > DRAM
81     .data :
82     {
83         *(.data*)
84         . = ALIGN(0x4);
85     } > DRAM
87     /DISCARD/ :
88     {
89         *(.eh_frame)
90     }
92     .iram :
93     {
94         _iramstart = .;
95         *(.icode)
96         *(.irodata)
97         *(.idata)
98         . = ALIGN(0x4);
99         _iramend = .;
100     } > IRAM AT> DRAM
102     .ibss (NOLOAD) :
103     {
104         _iedata = .;
105         *(.qharray)
106         *(.ibss)
107         . = ALIGN(0x4);
108         _iend = .;
109     } > IRAM
111     _iramcopy = LOADADDR(.iram);
113     .stack (NOLOAD) :
114     {
115        *(.stack)
116        stackbegin = .;
117        . += 0x2000;
118        stackend = .;
119     } > DRAM
121     .bss (NOLOAD) :
122     {
123        _edata = .;
124         *(.bss*)
125         *(COMMON)
126         . = ALIGN(0x4);
127        _end = .;
128     } > DRAM
130     .audiobuf (NOLOAD) :
131     {
132         . = ALIGN(4);
133         _audiobuffer = .;
134         audiobuffer = .;
135     } > DRAM
137     .audiobufend ENDAUDIOADDR (NOLOAD) :
138     {
139         audiobufend = .;
140         _audiobufend = .;
141     } > DRAM
143     .codec CODECORIG (NOLOAD) :
144     {
145         codecbuf = .;
146         _codecbuf = .;
147 #ifdef AMS_LOWMEM
148     } > CODEC_IRAM
149 #else
150     } > DRAM
151 #endif
153     .plugin ENDADDR (NOLOAD) :
154     {
155         _pluginbuf = .;
156         pluginbuf = .;
157     }