@@ -84,9 +84,7 @@ SECTIONS
8484 {
8585 /* The .head.text section must be the first section! */
8686 *(.head.text)
87- *(.literal)
88- TEXT_TEXT
89- *(.srom.text)
87+ *(.literal .text )
9088 VMLINUX_SYMBOL(__sched_text_start) = .;
9189 *(.sched.literal .sched.text)
9290 VMLINUX_SYMBOL(__sched_text_end) = .;
@@ -96,39 +94,14 @@ SECTIONS
9694
9795 }
9896 _etext = .;
97+ PROVIDE (etext = .);
9998
10099 . = ALIGN(16 );
101100
102101 RODATA
103102
104103 /* Relocation table */
105104
106- . = ALIGN(16 );
107- __boot_reloc_table_start = ABSOLUTE(.);
108-
109- __relocate : {
110-
111- RELOCATE_ENTRY(_WindowVectors_text,
112- .WindowVectors.text);
113- #if 0
114- RELOCATE_ENTRY(_KernelExceptionVector_literal,
115- .KernelExceptionVector.literal);
116- #endif
117- RELOCATE_ENTRY(_KernelExceptionVector_text,
118- .KernelExceptionVector.text);
119- #if 0
120- RELOCATE_ENTRY(_UserExceptionVector_literal,
121- .UserExceptionVector.literal);
122- #endif
123- RELOCATE_ENTRY(_UserExceptionVector_text,
124- .UserExceptionVector.text);
125- RELOCATE_ENTRY(_DoubleExceptionVector_literal,
126- .DoubleExceptionVector.literal);
127- RELOCATE_ENTRY(_DoubleExceptionVector_text,
128- .DoubleExceptionVector.text);
129- }
130- __boot_reloc_table_end = ABSOLUTE(.) ;
131-
132105 .fixup : { *(.fixup) }
133106
134107 . = ALIGN(16 );
@@ -145,8 +118,7 @@ SECTIONS
145118 _fdata = .;
146119 .data :
147120 {
148- DATA_DATA
149- CONSTRUCTORS
121+ *(.data ) CONSTRUCTORS
150122 . = ALIGN(XCHAL_ICACHE_LINESIZE);
151123 *(.data .cacheline_aligned)
152124 }
@@ -174,6 +146,22 @@ SECTIONS
174146 __tagtable_begin = .;
175147 *(.taglist)
176148 __tagtable_end = .;
149+
150+ . = ALIGN(16 );
151+ __boot_reloc_table_start = ABSOLUTE(.);
152+
153+ RELOCATE_ENTRY(_WindowVectors_text,
154+ .WindowVectors.text);
155+ RELOCATE_ENTRY(_KernelExceptionVector_text,
156+ .KernelExceptionVector.text);
157+ RELOCATE_ENTRY(_UserExceptionVector_text,
158+ .UserExceptionVector.text);
159+ RELOCATE_ENTRY(_DoubleExceptionVector_literal,
160+ .DoubleExceptionVector.literal);
161+ RELOCATE_ENTRY(_DoubleExceptionVector_text,
162+ .DoubleExceptionVector.text);
163+
164+ __boot_reloc_table_end = ABSOLUTE(.) ;
177165 }
178166
179167 . = ALIGN(XCHAL_ICACHE_LINESIZE);
@@ -194,16 +182,6 @@ SECTIONS
194182
195183 SECURITY_INIT
196184
197- . = ALIGN(4 );
198-
199- __start___ftr_fixup = .;
200- __ftr_fixup : { *(__ftr_fixup) }
201- __stop___ftr_fixup = .;
202-
203- . = ALIGN(4096 );
204- __per_cpu_start = .;
205- .data .percpu : { *(.data .percpu) }
206- __per_cpu_end = .;
207185
208186#ifdef CONFIG_BLK_DEV_INITRD
209187 . = ALIGN(4096 );
@@ -212,6 +190,12 @@ SECTIONS
212190 __initramfs_end = .;
213191#endif
214192
193+ . = ALIGN(4096 );
194+ __per_cpu_start = .;
195+ .data .percpu : { *(.data .percpu) }
196+ __per_cpu_end = .;
197+
198+
215199 /* We need this dummy segment here */
216200
217201 . = ALIGN(4 );
@@ -273,9 +257,9 @@ SECTIONS
273257
274258 /* BSS section */
275259 _bss_start = .;
276- .sbss : { *(.sbss) *(.scommon) }
277- .bss : { *(COMMON) *(.bss ) }
260+ .bss : { *(.bss .page_aligned) *(.bss ) }
278261 _bss_end = .;
262+
279263 _end = .;
280264
281265 /* only used by the boot loader */
@@ -293,16 +277,16 @@ SECTIONS
293277 *(.ResetVector.text)
294278 }
295279
296-
297280 /* Sections to be discarded */
298281 /DISCARD/ :
299282 {
300- *(.text .exit)
301- *(.text .exit.literal)
302- *(.data .exit)
283+ *(.exit.literal .exit.text)
284+ *(.exit.data)
303285 *(.exitcall.exit)
304286 }
305287
288+ .xt.lit : { *(.xt.lit) }
289+ .xt.prop : { *(.xt.prop) }
306290
307291 .debug 0 : { *(.debug) }
308292 .line 0 : { *(.line) }
0 commit comments