diff options
Diffstat (limited to 'lib/chibios/os/common/startup/e200/compilers/GCC/ld/rules_z0.ld')
-rw-r--r-- | lib/chibios/os/common/startup/e200/compilers/GCC/ld/rules_z0.ld | 159 |
1 files changed, 159 insertions, 0 deletions
diff --git a/lib/chibios/os/common/startup/e200/compilers/GCC/ld/rules_z0.ld b/lib/chibios/os/common/startup/e200/compilers/GCC/ld/rules_z0.ld new file mode 100644 index 000000000..b8720997d --- /dev/null +++ b/lib/chibios/os/common/startup/e200/compilers/GCC/ld/rules_z0.ld | |||
@@ -0,0 +1,159 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio | ||
3 | |||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | you may not use this file except in compliance with the License. | ||
6 | You may obtain a copy of the License at | ||
7 | |||
8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | |||
10 | Unless required by applicable law or agreed to in writing, software | ||
11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | See the License for the specific language governing permissions and | ||
14 | limitations under the License. | ||
15 | */ | ||
16 | |||
17 | __ram_size__ = LENGTH(ram); | ||
18 | __ram_start__ = ORIGIN(ram); | ||
19 | __ram_end__ = ORIGIN(ram) + LENGTH(ram); | ||
20 | |||
21 | ENTRY(_reset_address) | ||
22 | |||
23 | SECTIONS | ||
24 | { | ||
25 | . = ORIGIN(flash); | ||
26 | .boot0 : ALIGN(16) | ||
27 | { | ||
28 | KEEP(*(.boot)) | ||
29 | } > flash | ||
30 | |||
31 | .boot1 : ALIGN(16) | ||
32 | { | ||
33 | KEEP(*(.handlers)) | ||
34 | KEEP(*(.crt0)) | ||
35 | /* The vectors table requires a 2kB alignment.*/ | ||
36 | . = ALIGN(0x800); | ||
37 | KEEP(*(.vectors)) | ||
38 | /* The IVPR register requires a 4kB alignment.*/ | ||
39 | . = ALIGN(0x1000); | ||
40 | __ivpr_base__ = .; | ||
41 | KEEP(*(.ivors)) | ||
42 | } > flash | ||
43 | |||
44 | constructors : ALIGN(4) | ||
45 | { | ||
46 | PROVIDE(__init_array_start = .); | ||
47 | KEEP(*(SORT(.init_array.*))) | ||
48 | KEEP(*(.init_array)) | ||
49 | PROVIDE(__init_array_end = .); | ||
50 | } > flash | ||
51 | |||
52 | destructors : ALIGN(4) | ||
53 | { | ||
54 | PROVIDE(__fini_array_start = .); | ||
55 | KEEP(*(.fini_array)) | ||
56 | KEEP(*(SORT(.fini_array.*))) | ||
57 | PROVIDE(__fini_array_end = .); | ||
58 | } > flash | ||
59 | |||
60 | .text_vle : ALIGN(16) | ||
61 | { | ||
62 | *(.text_vle) | ||
63 | *(.text_vle.*) | ||
64 | *(.gnu.linkonce.t_vle.*) | ||
65 | } > flash | ||
66 | |||
67 | .text : ALIGN(16) | ||
68 | { | ||
69 | *(.text) | ||
70 | *(.text.*) | ||
71 | *(.gnu.linkonce.t.*) | ||
72 | } > flash | ||
73 | |||
74 | .rodata : ALIGN(16) | ||
75 | { | ||
76 | *(.glue_7t) | ||
77 | *(.glue_7) | ||
78 | *(.gcc*) | ||
79 | *(.rodata) | ||
80 | *(.rodata.*) | ||
81 | *(.rodata1) | ||
82 | } > flash | ||
83 | |||
84 | .sdata2 : ALIGN(16) | ||
85 | { | ||
86 | __sdata2_start__ = . + 0x8000; | ||
87 | *(.sdata2) | ||
88 | *(.sdata2.*) | ||
89 | *(.gnu.linkonce.s2.*) | ||
90 | *(.sbss2) | ||
91 | *(.sbss2.*) | ||
92 | *(.gnu.linkonce.sb2.*) | ||
93 | } > flash | ||
94 | |||
95 | .eh_frame_hdr : | ||
96 | { | ||
97 | *(.eh_frame_hdr) | ||
98 | } > flash | ||
99 | |||
100 | .eh_frame : ONLY_IF_RO | ||
101 | { | ||
102 | *(.eh_frame) | ||
103 | } > flash | ||
104 | |||
105 | .romdata : ALIGN(16) | ||
106 | { | ||
107 | __romdata_start__ = .; | ||
108 | } > flash | ||
109 | |||
110 | .stacks (NOLOAD) : ALIGN(16) | ||
111 | { | ||
112 | . = ALIGN(8); | ||
113 | __irq_stack_base__ = .; | ||
114 | . += __irq_stack_size__; | ||
115 | . = ALIGN(8); | ||
116 | __irq_stack_end__ = .; | ||
117 | __process_stack_base__ = .; | ||
118 | __main_thread_stack_base__ = .; | ||
119 | . += __process_stack_size__; | ||
120 | . = ALIGN(8); | ||
121 | __process_stack_end__ = .; | ||
122 | __main_thread_stack_end__ = .; | ||
123 | } > ram | ||
124 | |||
125 | .data : AT(__romdata_start__) | ||
126 | { | ||
127 | . = ALIGN(4); | ||
128 | __data_start__ = .; | ||
129 | *(.data) | ||
130 | *(.data.*) | ||
131 | *(.gnu.linkonce.d.*) | ||
132 | __sdata_start__ = . + 0x8000; | ||
133 | *(.sdata) | ||
134 | *(.sdata.*) | ||
135 | *(.gnu.linkonce.s.*) | ||
136 | __data_end__ = .; | ||
137 | } > ram | ||
138 | |||
139 | .sbss (NOLOAD) : | ||
140 | { | ||
141 | __bss_start__ = .; | ||
142 | *(.sbss) | ||
143 | *(.sbss.*) | ||
144 | *(.gnu.linkonce.sb.*) | ||
145 | *(.scommon) | ||
146 | } > ram | ||
147 | |||
148 | .bss (NOLOAD) : | ||
149 | { | ||
150 | *(.bss) | ||
151 | *(.bss.*) | ||
152 | *(.gnu.linkonce.b.*) | ||
153 | *(COMMON) | ||
154 | __bss_end__ = .; | ||
155 | } > ram | ||
156 | |||
157 | __heap_base__ = __bss_end__; | ||
158 | __heap_end__ = __ram_end__; | ||
159 | } | ||