@@ -142,26 +142,7 @@ SECTIONS
142
142
__eh_frame = ABSOLUTE (.);
143
143
KEEP(*(.eh_frame))
144
144
. = (. + 7) & ~ 3;
145
- /*
146
- * C++ constructor and destructor tables
147
- * Don't include anything from crtbegin.o or crtend.o , as IDF doesn't use toolchain crt.
148
- *
149
- * RISC-V gcc is configured with --enable-initfini-array so it emits an .init_array section instead.
150
- * But the init_priority sections will be sorted for iteration in ascending order during startup.
151
- * The rest of the init_array sections is sorted for iteration in descending order during startup, however.
152
- * Hence a different section is generated for the init_priority functions which is iterated in
153
- * ascending order during startup. The corresponding code can be found in startup.c.
154
- */
155
- __init_priority_array_start = ABSOLUTE (.);
156
- KEEP (*(EXCLUDE_FILE (*crtend.* *crtbegin.*) .init_array.*))
157
- __init_priority_array_end = ABSOLUTE (.);
158
- __init_array_start = ABSOLUTE (.);
159
- KEEP (*(EXCLUDE_FILE (*crtend.* *crtbegin.*) .init_array))
160
- __init_array_end = ABSOLUTE (.);
161
- KEEP (*crtbegin.*(.dtors))
162
- KEEP (*(EXCLUDE_FILE (*crtend.*) .dtors))
163
- KEEP (*(SORT(.dtors.*)))
164
- KEEP (*(.dtors))
145
+
165
146
/* C++ exception handlers table : */
166
147
__XT_EXCEPTION_DESCS_ = ABSOLUTE (.);
167
148
*(.xt_except_desc)
@@ -185,7 +166,7 @@ SECTIONS
185
166
*(.tbss)
186
167
*(.tbss.*)
187
168
*(.srodata)
188
- *(" .srodata.*" )
169
+ *(.srodata.*)
189
170
*(.rodata)
190
171
*(.rodata.*)
191
172
*(.rodata_wlog)
@@ -200,12 +181,12 @@ SECTIONS
200
181
#pragma push_macro("GROUP_ROM_LINK_IN")
201
182
#undef GROUP_ROM_LINK_IN
202
183
#define GROUP_ROM_LINK_IN(vregion, lregion) > RODATA_REGION AT > lregion
203
- #include " linker/common-rom/common-rom-kernel-devices .ld"
204
- #include " linker/common-rom/common-rom-cpp .ld"
205
- #include " linker/common-rom/common-rom-net.ld"
206
- #include " linker/common-rom/common-rom-bt.ld"
207
- #include " linker/common-rom/common-rom-debug.ld"
208
- #include " linker/common-rom/common-rom-misc.ld"
184
+ #include <zephyr/ linker/common-rom/common-rom-cpp .ld>
185
+ #include <zephyr/ linker/common-rom/common-rom-kernel-devices .ld>
186
+ #include <zephyr/ linker/common-rom/common-rom-net.ld>
187
+ #include <zephyr/ linker/common-rom/common-rom-bt.ld>
188
+ #include <zephyr/ linker/common-rom/common-rom-debug.ld>
189
+ #include <zephyr/ linker/common-rom/common-rom-misc.ld>
209
190
#pragma pop_macro("GROUP_ROM_LINK_IN")
210
191
211
192
.iram0.text : ALIGN (4)
@@ -254,6 +235,7 @@ SECTIONS
254
235
*libzephyr.a :loader.*(.literal .text .literal.* .text.*)
255
236
*libsoc.a :rtc_*.*(.literal .text .literal.* .text.*)
256
237
*libsoc.a :cpu_util.*(.literal .text .literal.* .text.*)
238
+ *liblib__libc__newlib.a :string.*(.literal .text .literal.* .text.*)
257
239
*liblib__libc__minimal.a :string.*(.literal .text .literal.* .text.*)
258
240
*libphy.a :( .phyiram .phyiram.*)
259
241
*libgcov.a :(.literal .text .literal.* .text.*)
@@ -350,21 +332,25 @@ SECTIONS
350
332
. = ALIGN (4);
351
333
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
352
334
335
+ #include <zephyr/linker/cplusplus-rom.ld>
336
+ #include <zephyr/linker/thread-local-storage.ld>
353
337
#include <snippets-data-sections.ld>
354
338
#include <zephyr/linker/common-ram.ld>
355
339
#include <snippets-ram-sections.ld>
340
+ #include <zephyr/linker/cplusplus-ram.ld>
356
341
357
342
/* logging sections should be placed in RAM area to avoid flash cache disabled issues */
358
343
#pragma push_macro("GROUP_ROM_LINK_IN")
359
344
#undef GROUP_ROM_LINK_IN
360
345
#define GROUP_ROM_LINK_IN GROUP_DATA_LINK_IN
361
- #include " linker/common-rom/common-rom-logging.ld"
346
+ #include <zephyr/ linker/common-rom/common-rom-logging.ld>
362
347
#pragma pop_macro("GROUP_ROM_LINK_IN")
363
348
364
349
.dummy.dram.data :
365
350
{
366
351
. = ALIGN (4);
367
352
#include <snippets-rwdata.ld>
353
+ _end = ABSOLUTE (.);
368
354
_data_end = ABSOLUTE (.);
369
355
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
370
356
0 commit comments