Mercurial > public > ostc4
comparison Small_CPU/CPU2-RTE.ld @ 40:da86a7adc4fa
Aligned structure with CPU1 linker file
author | Ideenmodellierer |
---|---|
date | Sun, 29 Jul 2018 16:45:00 +0200 |
parents | 5f11787b4f42 |
children | 321df89d5710 |
comparison
equal
deleted
inserted
replaced
39:46530453eb01 | 40:da86a7adc4fa |
---|---|
68 */ | 68 */ |
69 | 69 |
70 | 70 |
71 SECTIONS | 71 SECTIONS |
72 { | 72 { |
73 .isr_vector 0x08000000 : | |
74 { | |
75 . = ALIGN(4); | |
76 KEEP( *(.isr_vector) ) | |
77 KEEP(*(.init)) | |
78 KEEP(*(.fini)) | |
79 } >ROM | |
80 | |
73 /* Place FirmwareData at absolute address */ | 81 /* Place FirmwareData at absolute address */ |
74 .firmware_data 0x08005000: | 82 .firmware_data 0x08005000: |
75 { | 83 { |
76 cpu2_FirmwareData = 0x08005000; | 84 cpu2_FirmwareData = 0; |
85 KEEP( *(.firmware_data) ) | |
77 } > ROM | 86 } > ROM |
78 | 87 |
79 .text ORIGIN(ROM) : | 88 .text 0x08005100 : |
80 { | 89 { |
81 KEEP(*(.isr_vector)) | 90 . = ALIGN(4); |
91 *(.text) /* .text sections (code) */ | |
82 *(.text*) | 92 *(.text*) |
83 | 93 *(.eh_frame*) |
84 KEEP(*(.init)) | 94 . = ALIGN(4); |
85 KEEP(*(.fini)) | 95 |
86 | |
87 /* .ctors */ | |
88 *crtbegin.o(.ctors) | |
89 *crtbegin?.o(.ctors) | |
90 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) | |
91 *(SORT(.ctors.*)) | |
92 *(.ctors) | |
93 | |
94 /* .dtors */ | |
95 *crtbegin.o(.dtors) | |
96 *crtbegin?.o(.dtors) | |
97 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) | |
98 *(SORT(.dtors.*)) | |
99 *(.dtors) | |
100 | |
101 *(.rodata*) | |
102 | |
103 KEEP(*(.eh_frame*)) | |
104 } > ROM | 96 } > ROM |
105 | 97 |
98 /********************** Constant data into ROM memory *********************/ | |
99 .rodata : | |
100 { | |
101 . = ALIGN(4); | |
102 *(.rodata) /* .rodata sections (constants, strings, etc.) */ | |
103 *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ | |
104 . = ALIGN(4); | |
105 } >ROM | |
106 | |
106 .ARM.extab : | 107 .ARM.extab : |
107 { | 108 { |
108 *(.ARM.extab* .gnu.linkonce.armextab.*) | 109 *(.ARM.extab* .gnu.linkonce.armextab.*) |
109 } > ROM | 110 } > ROM |
110 | 111 |
113 { | 114 { |
114 *(.ARM.exidx* .gnu.linkonce.armexidx.*) | 115 *(.ARM.exidx* .gnu.linkonce.armexidx.*) |
115 } > ROM | 116 } > ROM |
116 __exidx_end = .; | 117 __exidx_end = .; |
117 | 118 |
118 __etext = .; | 119 .preinit_array : |
120 { | |
121 . = ALIGN(4); | |
122 PROVIDE_HIDDEN( __preinit_array_start = . ); | |
123 KEEP( *(.preinit_array*) ) | |
124 PROVIDE_HIDDEN( __preinit_array_end = . ); | |
125 . = ALIGN(4); | |
126 } >ROM | |
127 | |
128 .init_array : | |
129 { | |
130 . = ALIGN(4); | |
131 PROVIDE_HIDDEN( __init_array_start = . ); | |
132 KEEP( *(SORT(.init_array.*)) ) | |
133 KEEP( *(.init_array*) ) | |
134 PROVIDE_HIDDEN( __init_array_end = . ); | |
135 . = ALIGN(4); | |
136 } >ROM | |
137 | |
138 .fini_array : | |
139 { | |
140 . = ALIGN(4); | |
141 PROVIDE_HIDDEN( __fini_array_start = . ); | |
142 KEEP( *(SORT(.fini_array.*)) ) | |
143 KEEP( *(.fini_array*) ) | |
144 PROVIDE_HIDDEN( __fini_array_end = . ); | |
145 . = ALIGN(4); | |
146 | |
147 __etext = .; /* define a global symbols at end of code */ | |
148 } >ROM | |
119 | 149 |
120 .data : AT (__etext) | 150 /* Used by the startup to initialize data */ |
151 _sidata = LOADADDR(.data); | |
152 | |
153 .data : | |
121 { | 154 { |
155 . = ALIGN(4); | |
122 __data_start__ = .; | 156 __data_start__ = .; |
157 _sdata = .; /* create a global symbol at data start */ | |
158 *(.data) /* .data sections */ | |
159 *(.data*) | |
123 *(vtable) | 160 *(vtable) |
124 *(.data*) | |
125 | |
126 . = ALIGN(4); | |
127 /* preinit data */ | |
128 PROVIDE_HIDDEN (__preinit_array_start = .); | |
129 KEEP(*(.preinit_array)) | |
130 PROVIDE_HIDDEN (__preinit_array_end = .); | |
131 | |
132 . = ALIGN(4); | |
133 /* init data */ | |
134 PROVIDE_HIDDEN (__init_array_start = .); | |
135 KEEP(*(SORT(.init_array.*))) | |
136 KEEP(*(.init_array)) | |
137 PROVIDE_HIDDEN (__init_array_end = .); | |
138 | |
139 | |
140 . = ALIGN(4); | |
141 /* finit data */ | |
142 PROVIDE_HIDDEN (__fini_array_start = .); | |
143 KEEP(*(SORT(.fini_array.*))) | |
144 KEEP(*(.fini_array)) | |
145 PROVIDE_HIDDEN (__fini_array_end = .); | |
146 | |
147 . = ALIGN(4); | 161 . = ALIGN(4); |
148 /* All data end */ | 162 /* All data end */ |
149 __data_end__ = .; | 163 __data_end__ = .; |
164 } >RAM AT>ROM | |
150 | 165 |
151 } > RAM | 166 .bss : |
152 | |
153 .bss (NOLOAD): | |
154 { | 167 { |
155 __bss_start__ = .; | 168 __bss_start__ = .; |
156 *(.bss*) | 169 *(.bss*) |
157 *(COMMON) | 170 *(COMMON) |
158 __bss_end__ = .; | 171 __bss_end__ = .; |
159 } > RAM | 172 } >RAM |
160 | 173 |
161 .heap (NOLOAD): | 174 .heap : |
162 { | 175 { |
163 __end__ = .; | 176 __end__ = .; |
164 end = __end__; | 177 end = __end__; |
165 *(.heap*) | 178 *(.heap*) |
166 __HeapLimit = .; | 179 __HeapLimit = .; |
167 } > RAM | 180 } > RAM |
168 | 181 |
169 /* .stack_dummy section doesn't contains any symbols. It is only | 182 /* .stack_dummy section doesn't contains any symbols. It is only |
170 * used for linker to calculate size of stack sections, and assign | 183 * used for linker to calculate size of stack sections, and assign |
171 * values to stack symbols later */ | 184 * values to stack symbols later */ |
172 .stack_dummy (NOLOAD): | 185 .stack_dummy : |
173 { | 186 { |
174 *(.stack) | 187 *(.stack) |
175 } > RAM | 188 } > RAM |
176 | 189 |
177 /* Set stack top to end of RAM, and stack limit move down by | 190 /* Set stack top to end of RAM, and stack limit move down by |