diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2011-09-06 12:38:30 +0000 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2011-09-06 12:38:30 +0000 |
commit | 0b35cdd77d8c9c77a0d633561b8128dd596db818 (patch) | |
tree | 63bc83090c29c04b1c403b1f9dc5f0ac682d5aa0 /firmware | |
parent | 472314ba734ce2d42e14cd44ba55d7600c98d222 (diff) | |
download | rockbox-0b35cdd77d8c9c77a0d633561b8128dd596db818.tar.gz rockbox-0b35cdd77d8c9c77a0d633561b8128dd596db818.zip |
rk27xx - app linker script
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30445 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/target/arm/rk27xx/app.lds | 129 |
1 files changed, 129 insertions, 0 deletions
diff --git a/firmware/target/arm/rk27xx/app.lds b/firmware/target/arm/rk27xx/app.lds new file mode 100644 index 0000000000..080c74fc7c --- /dev/null +++ b/firmware/target/arm/rk27xx/app.lds | |||
@@ -0,0 +1,129 @@ | |||
1 | #include "config.h" | ||
2 | |||
3 | ENTRY(start) | ||
4 | #ifdef ROCKBOX_LITTLE_ENDIAN | ||
5 | OUTPUT_FORMAT(elf32-littlearm) | ||
6 | #else | ||
7 | OUTPUT_FORMAT(elf32-bigarm) | ||
8 | #endif | ||
9 | OUTPUT_ARCH(arm) | ||
10 | STARTUP(target/arm/rk27xx/crt0.o) | ||
11 | |||
12 | #define PLUGINSIZE PLUGIN_BUFFER_SIZE | ||
13 | #define CODECSIZE CODEC_SIZE | ||
14 | |||
15 | #define DRAMORIG 0x60000000 | ||
16 | #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - CODECSIZE | ||
17 | |||
18 | #define IRAMORIG 0x00000000 | ||
19 | #define IRAMSIZE 4K | ||
20 | |||
21 | /* End of the audio buffer, where the codec buffer starts */ | ||
22 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) | ||
23 | #define CODECORIG (ENDAUDIOADDR) | ||
24 | |||
25 | /* Where the codec buffer ends, and the plugin buffer starts */ | ||
26 | #define ENDADDR (ENDAUDIOADDR + CODECSIZE) | ||
27 | |||
28 | MEMORY | ||
29 | { | ||
30 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | ||
31 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | ||
32 | } | ||
33 | |||
34 | SECTIONS | ||
35 | { | ||
36 | loadaddress = DRAMORIG; | ||
37 | |||
38 | .intvect : { | ||
39 | _intvectstart = . ; | ||
40 | *(.intvect) | ||
41 | _intvectend = _newstart ; | ||
42 | } > IRAM AT > DRAM | ||
43 | _intvectcopy = LOADADDR(.intvect) ; | ||
44 | |||
45 | .text : { | ||
46 | *(.init.text) | ||
47 | *(.text*) | ||
48 | *(.glue_7*) | ||
49 | } > DRAM | ||
50 | |||
51 | .data : { | ||
52 | *(.rodata*) | ||
53 | *(.data*) | ||
54 | *(.ncdata*); | ||
55 | . = ALIGN(0x4); | ||
56 | } > DRAM | ||
57 | |||
58 | .iram : | ||
59 | { | ||
60 | _iramstart = .; | ||
61 | *(.icode) | ||
62 | *(.irodata) | ||
63 | *(.idata) | ||
64 | . = ALIGN(0x4); | ||
65 | _iramend = .; | ||
66 | } > DRAM | ||
67 | _iramcopy = LOADADDR(.iram) ; | ||
68 | |||
69 | .ibss (NOLOAD) : | ||
70 | { | ||
71 | _iedata = .; | ||
72 | *(.qharray) | ||
73 | *(.ibss) | ||
74 | . = ALIGN(0x4); | ||
75 | _iend = .; | ||
76 | } > DRAM | ||
77 | |||
78 | .stack (NOLOAD) : | ||
79 | { | ||
80 | *(.stack) | ||
81 | _stackbegin = .; | ||
82 | stackbegin = .; | ||
83 | . += 0x2000; | ||
84 | _stackend = .; | ||
85 | stackend = .; | ||
86 | _irqstackbegin = .; | ||
87 | . += 0x400; | ||
88 | _irqstackend = .; | ||
89 | _fiqstackbegin = .; | ||
90 | . += 0x400; | ||
91 | _fiqstackend = .; | ||
92 | } > DRAM | ||
93 | |||
94 | .bss (NOLOAD) : { | ||
95 | _edata = .; | ||
96 | *(.bss*); | ||
97 | *(.ibss); | ||
98 | *(.ncbss*); | ||
99 | *(COMMON); | ||
100 | . = ALIGN(0x4); | ||
101 | _end = .; | ||
102 | } > DRAM | ||
103 | |||
104 | .audiobuf (NOLOAD) : | ||
105 | { | ||
106 | . = ALIGN(4); | ||
107 | _audiobuffer = .; | ||
108 | audiobuffer = .; | ||
109 | } > DRAM | ||
110 | |||
111 | .audiobufend ENDAUDIOADDR (NOLOAD) : | ||
112 | { | ||
113 | audiobufend = .; | ||
114 | _audiobufend = .; | ||
115 | } > DRAM | ||
116 | |||
117 | .codec CODECORIG (NOLOAD) : | ||
118 | { | ||
119 | codecbuf = .; | ||
120 | _codecbuf = .; | ||
121 | } > DRAM | ||
122 | |||
123 | .plugin ENDADDR (NOLOAD) : | ||
124 | { | ||
125 | _pluginbuf = .; | ||
126 | pluginbuf = .; | ||
127 | } | ||
128 | |||
129 | } | ||