@@ -33,13 +33,7 @@ SECTIONS
3333{
3434 /* Vector table. Has the initial stack pointer and the initial
3535 structure for the arm interrupts */
36- .vectors :
37- {
38- . = ALIGN (4 );
39- /* vector table */
40- KEEP (*(.vectors .vectors .*));
41- . = ALIGN (4 );
42- } > rom
36+ VECTORS () > rom
4337
4438 /* Text segment, stores all user code */
4539 .text :
@@ -66,50 +60,13 @@ SECTIONS
6660 } > rom
6761
6862 /* Read only data */
69- .rodata :
70- {
71- . = ALIGN (4 );
72-
73- /* Constands, strings, etc */
74- *(.rodata .rodata .* .gnu .linkonce .r .*);
75-
76- . = ALIGN (4 );
77- } > rom
63+ RODATA () > rom
7864
7965 /* Support C constructors, and C destructors in both user code
8066 and the C library. This also provides support for C++ code. */
81- .preinit_array :
82- {
83- . = ALIGN (4 );
84- PROVIDE (__preinit_array_start = .);
85-
86- KEEP (*(SORT (.preinit_array .*)))
87- KEEP (*(SORT (.preinit_array )))
88-
89- PROVIDE (__preinit_array_end = .);
90- } > rom
91-
92- .init_array :
93- {
94- . = ALIGN (4 );
95- PROVIDE (__init_array_start = .);
96-
97- KEEP (*(SORT (.init_array .*)))
98- KEEP (*(SORT (.init_array )))
99-
100- PROVIDE (__init_array_end = .);
101- } > rom
102-
103- .fini_array :
104- {
105- . = ALIGN (4 );
106- PROVIDE (__fini_array_start = .);
107-
108- KEEP (*(SORT (.fini_array .*)))
109- KEEP (*(SORT (.fini_array )))
110-
111- PROVIDE (__fini_array_end = .);
112- } > rom
67+ INIT_ARRAY (preinit_array) > rom
68+ INIT_ARRAY (init_array) > rom
69+ INIT_ARRAY (fini_array) > rom
11370
11471 /* Stack segment */
11572 .stack (NOLOAD) :
0 commit comments