File tree Expand file tree Collapse file tree 7 files changed +113
-0
lines changed Expand file tree Collapse file tree 7 files changed +113
-0
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,10 @@ SECTIONS {
107
107
*(".rodata.*")
108
108
*(.gnu.linkonce.r.*)
109
109
110
+ #ifdef CONFIG_SOC_RODATA_LD
111
+ #include <soc-rodata.ld>
112
+ #endif
113
+
110
114
#ifdef CONFIG_CUSTOM_RODATA_LD
111
115
/* Located in project source directory */
112
116
#include <custom-rodata.ld>
@@ -228,6 +232,10 @@ SECTIONS {
228
232
KERNEL_INPUT_SECTION(".noinit.*")
229
233
*(".kernel_noinit.*")
230
234
235
+ #ifdef CONFIG_SOC_NOINIT_LD
236
+ #include <soc-noinit.ld>
237
+ #endif
238
+
231
239
} GROUP_LINK_IN(RAMABLE_REGION)
232
240
233
241
SECTION_DATA_PROLOGUE(_DATA_SECTION_NAME,,) {
@@ -238,6 +246,10 @@ SECTIONS {
238
246
KERNEL_INPUT_SECTION(".data.*")
239
247
*(".kernel.*")
240
248
249
+ #ifdef CONFIG_SOC_RWDATA_LD
250
+ #include <soc-rwdata.ld>
251
+ #endif
252
+
241
253
#ifdef CONFIG_CUSTOM_RWDATA_LD
242
254
/* Located in project source directory */
243
255
#include <custom-rwdata.ld>
Original file line number Diff line number Diff line change @@ -163,6 +163,10 @@ SECTIONS
163
163
*(".rodata.*")
164
164
*(.gnu.linkonce.r.*)
165
165
166
+ #ifdef CONFIG_SOC_RODATA_LD
167
+ #include <soc-rodata.ld>
168
+ #endif
169
+
166
170
#ifdef CONFIG_CUSTOM_RODATA_LD
167
171
/* Located in project source directory */
168
172
#include <custom-rodata.ld>
@@ -330,6 +334,10 @@ SECTIONS
330
334
KERNEL_INPUT_SECTION(".noinit.*")
331
335
*(".kernel_noinit.*")
332
336
337
+ #ifdef CONFIG_SOC_NOINIT_LD
338
+ #include <soc-noinit.ld>
339
+ #endif
340
+
333
341
} GROUP_LINK_IN(RAMABLE_REGION)
334
342
335
343
SECTION_DATA_PROLOGUE(_DATA_SECTION_NAME,,)
@@ -339,6 +347,10 @@ SECTIONS
339
347
KERNEL_INPUT_SECTION(".data.*")
340
348
*(".kernel.*")
341
349
350
+ #ifdef CONFIG_SOC_RWDATA_LD
351
+ #include <soc-rwdata.ld>
352
+ #endif
353
+
342
354
#ifdef CONFIG_CUSTOM_RWDATA_LD
343
355
/* Located in project source directory */
344
356
#include <custom-rwdata.ld>
Original file line number Diff line number Diff line change @@ -128,6 +128,10 @@ SECTIONS
128
128
*(".rodata.*")
129
129
*(.gnu.linkonce.r.*)
130
130
131
+ #ifdef CONFIG_SOC_RODATA_LD
132
+ #include <soc-rodata.ld>
133
+ #endif
134
+
131
135
#ifdef CONFIG_CUSTOM_RODATA_LD
132
136
/* Located in project source directory */
133
137
#include <custom-rodata.ld>
@@ -174,6 +178,10 @@ SECTIONS
174
178
*(.data)
175
179
*(".data.*")
176
180
181
+ #ifdef CONFIG_SOC_RWDATA_LD
182
+ #include <soc-rwdata.ld>
183
+ #endif
184
+
177
185
#ifdef CONFIG_CUSTOM_RWDATA_LD
178
186
/* Located in project source directory */
179
187
#include <custom-rwdata.ld>
@@ -231,6 +239,11 @@ SECTIONS
231
239
*/
232
240
*(.noinit)
233
241
*(".noinit.*")
242
+
243
+ #ifdef CONFIG_SOC_NOINIT_LD
244
+ #include <soc-noinit.ld>
245
+ #endif
246
+
234
247
} GROUP_LINK_IN(RAMABLE_REGION)
235
248
236
249
/* Define linker symbols */
Original file line number Diff line number Diff line change @@ -96,6 +96,11 @@ SECTIONS
96
96
*(.rodata)
97
97
*(".rodata.*")
98
98
*(.gnu.linkonce.r.*)
99
+
100
+ #ifdef CONFIG_SOC_RODATA_LD
101
+ #include <soc-rodata.ld>
102
+ #endif
103
+
99
104
} GROUP_LINK_IN(ROMABLE_REGION)
100
105
101
106
_image_rom_end = .;
@@ -117,6 +122,10 @@ SECTIONS
117
122
*(.sdata .sdata.* .gnu.linkonce.s.*)
118
123
*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
119
124
125
+ #ifdef CONFIG_SOC_RWDATA_LD
126
+ #include <soc-rwdata.ld>
127
+ #endif
128
+
120
129
} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
121
130
122
131
#include <linker/common-ram.ld>
@@ -151,6 +160,11 @@ SECTIONS
151
160
*/
152
161
*(.noinit)
153
162
*(".noinit.*")
163
+
164
+ #ifdef CONFIG_SOC_NOINIT_LD
165
+ #include <soc-noinit.ld>
166
+ #endif
167
+
154
168
} GROUP_LINK_IN(RAMABLE_REGION)
155
169
156
170
_image_ram_end = .;
Original file line number Diff line number Diff line change @@ -90,6 +90,11 @@ SECTIONS
90
90
*(.rodata)
91
91
*(".rodata.*")
92
92
*(.gnu.linkonce.r.*)
93
+
94
+ #ifdef CONFIG_SOC_RODATA_LD
95
+ #include <soc-rodata.ld>
96
+ #endif
97
+
93
98
} GROUP_LINK_IN(RAMABLE_REGION)
94
99
95
100
_image_ram_start = .;
@@ -106,6 +111,10 @@ SECTIONS
106
111
*(.sdata .sdata.* .gnu.linkonce.s.*)
107
112
*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
108
113
114
+ #ifdef CONFIG_SOC_RWDATA_LD
115
+ #include <soc-rwdata.ld>
116
+ #endif
117
+
109
118
} GROUP_LINK_IN(RAMABLE_REGION)
110
119
111
120
SECTION_DATA_PROLOGUE(_BSS_SECTION_NAME,(NOLOAD),)
@@ -136,6 +145,11 @@ SECTIONS
136
145
*/
137
146
*(.noinit)
138
147
*(".noinit.*")
148
+
149
+ #ifdef CONFIG_SOC_NOINIT_LD
150
+ #include <soc-noinit.ld>
151
+ #endif
152
+
139
153
} GROUP_LINK_IN(RAMABLE_REGION)
140
154
141
155
_image_ram_end = .;
Original file line number Diff line number Diff line change @@ -132,6 +132,10 @@ SECTIONS
132
132
#endif
133
133
#endif
134
134
135
+ #ifdef CONFIG_SOC_RODATA_LD
136
+ #include <soc-rodata.ld>
137
+ #endif
138
+
135
139
#ifdef CONFIG_CUSTOM_RODATA_LD
136
140
/* Located in project source directory */
137
141
#include <custom-rodata.ld>
@@ -244,6 +248,10 @@ SECTIONS
244
248
KERNEL_INPUT_SECTION(".noinit.*")
245
249
*(".kernel_noinit.*")
246
250
251
+ #ifdef CONFIG_SOC_NOINIT_LD
252
+ #include <soc-noinit.ld>
253
+ #endif
254
+
247
255
MMU_PAGE_ALIGN
248
256
249
257
} GROUP_DATA_LINK_IN(RAMABLE_REGION, RAMABLE_REGION)
@@ -257,6 +265,10 @@ SECTIONS
257
265
KERNEL_INPUT_SECTION(".data.*")
258
266
*(".kernel.*")
259
267
268
+ #ifdef CONFIG_SOC_RWDATA_LD
269
+ #include <soc-rwdata.ld>
270
+ #endif
271
+
260
272
#ifdef CONFIG_CUSTOM_RWDATA_LD
261
273
/* Located in project source directory */
262
274
#include <custom-rwdata.ld>
Original file line number Diff line number Diff line change @@ -29,3 +29,39 @@ config SOC_COMPATIBLE_NRF52X
29
29
30
30
config SOC_COMPATIBLE_NRF52832
31
31
bool
32
+
33
+ #
34
+ # SOC_*_LD: SoC specific Linker script additions
35
+ #
36
+ config SOC_NOINIT_LD
37
+ bool
38
+ depends on (ARC || ARM || X86 || NIOS2 || RISCV32)
39
+ help
40
+ Include an SoC specific linker script fragment named soc-noinit.ld
41
+ for inserting additional data and linker directives into
42
+ the noinit section.
43
+
44
+ This only has effect if the SoC uses the common linker script
45
+ under include/arch/.
46
+
47
+ config SOC_RODATA_LD
48
+ bool
49
+ depends on (ARC || ARM || X86 || NIOS2 || RISCV32)
50
+ help
51
+ Include an SoC specific linker script fragment named soc-rodata.ld
52
+ for inserting additional data and linker directives into
53
+ the rodata section.
54
+
55
+ This only has effect if the SoC uses the common linker script
56
+ under include/arch/.
57
+
58
+ config SOC_RWDATA_LD
59
+ bool
60
+ depends on (ARC || ARM || X86 || NIOS2 || RISCV32)
61
+ help
62
+ Include an SoC specific linker script fragment named soc-rwdata.ld
63
+ for inserting additional data and linker directives into
64
+ the data section.
65
+
66
+ This only has effect if the SoC uses the common linker script
67
+ under include/arch/.
You can’t perform that action at this time.
0 commit comments