@@ -46,168 +46,219 @@ jiffies = jiffies_64;
4646#endif
4747SECTIONS
4848{
49+ . = KERNEL_BINARY_TEXT_START;
4950
50- . = KERNEL_BINARY_TEXT_START;
51-
52- _text = .; /* Text and read-only data */
53- .text ALIGN(16 ) : {
54- TEXT_TEXT
55- SCHED_TEXT
56- LOCK_TEXT
57- *(.text .do_softirq)
58- *(.text .sys_exit)
59- *(.text .do_sigaltstack)
60- *(.text .do_fork)
61- *(.text .*)
62- *(.fixup)
63- *(.lock .text) /* out-of-line lock text */
64- *(.gnu.warning)
51+ _text = .; /* Text and read-only data */
52+ .text ALIGN(16 ) : {
53+ TEXT_TEXT
54+ SCHED_TEXT
55+ LOCK_TEXT
56+ *(.text .do_softirq)
57+ *(.text .sys_exit)
58+ *(.text .do_sigaltstack)
59+ *(.text .do_fork)
60+ *(.text .*)
61+ *(.fixup)
62+ *(.lock .text) /* out-of-line lock text */
63+ *(.gnu.warning)
6564 } = 0
65+ /* End of text section */
66+ _etext = .;
6667
67- _etext = .; /* End of text section */
68+ RODATA
69+ BUG_TABLE
6870
69- RODATA
70-
71- BUG_TABLE
72-
73- /* writeable */
74- . = ALIGN(ASM_PAGE_SIZE); /* Make sure this is page aligned so
75- that we can properly leave these
76- as writable */
77- data_start = .;
78-
79- . = ALIGN( 16 ); /* Exception table */
80- __start___ex_table = .;
81- __ex_table : { *(__ex_table) }
82- __stop___ex_table = .;
71+ /* writeable */
72+ /* Make sure this is page aligned so
73+ * that we can properly leave these
74+ * as writable
75+ */
76+ . = ALIGN(ASM_PAGE_SIZE);
77+ data_start = .;
78+ . = ALIGN( 16 );
79+ /* Exception table */
80+ __ex_table : {
81+ __start___ex_table = .;
82+ *(__ex_table)
83+ __stop___ex_table = .;
84+ }
8385
84- NOTES
86+ NOTES
8587
86- __start___unwind = .; /* unwind info */
87- .PARISC.unwind : { *(.PARISC.unwind) }
88- __stop___unwind = .;
88+ /* unwind info */
89+ .PARISC.unwind : {
90+ __start___unwind = .;
91+ *(.PARISC.unwind)
92+ __stop___unwind = .;
93+ }
8994
90- /* rarely changed data like cpu maps */
91- . = ALIGN(16 );
92- .data .read_mostly : { *(.data .read_mostly) }
95+ /* rarely changed data like cpu maps */
96+ . = ALIGN(16 );
97+ .data .read_mostly : {
98+ *(.data .read_mostly)
99+ }
93100
94- . = ALIGN(L1_CACHE_BYTES);
95- .data : { /* Data */
96- DATA_DATA
97- CONSTRUCTORS
101+ . = ALIGN(L1_CACHE_BYTES);
102+ /* Data */
103+ .data : {
104+ DATA_DATA
105+ CONSTRUCTORS
98106 }
99107
100- . = ALIGN(L1_CACHE_BYTES);
101- .data .cacheline_aligned : { *(.data .cacheline_aligned) }
108+ . = ALIGN(L1_CACHE_BYTES);
109+ .data .cacheline_aligned : {
110+ *(.data .cacheline_aligned)
111+ }
102112
103- /* PA-RISC locks requires 16-byte alignment */
104- . = ALIGN(16 );
105- .data .lock_aligned : { *(.data .lock_aligned) }
113+ /* PA-RISC locks requires 16-byte alignment */
114+ . = ALIGN(16 );
115+ .data .lock_aligned : {
116+ *(.data .lock_aligned)
117+ }
106118
107- . = ALIGN(ASM_PAGE_SIZE);
108- /* nosave data is really only used for software suspend...it's here
109- * just in case we ever implement it */
110- __nosave_begin = .;
111- .data_nosave : { *(.data .nosave) }
112- . = ALIGN(ASM_PAGE_SIZE);
113- __nosave_end = .;
119+ /* nosave data is really only used for software suspend...it's here
120+ * just in case we ever implement it
121+ */
122+ . = ALIGN(ASM_PAGE_SIZE);
123+ __nosave_begin = .;
124+ .data_nosave : {
125+ *(.data .nosave)
126+ }
127+ . = ALIGN(ASM_PAGE_SIZE);
128+ __nosave_end = .;
114129
115- _edata = .; /* End of data section */
130+ /* End of data section */
131+ _edata = .;
116132
117- __bss_start = .; /* BSS */
118- /* page table entries need to be PAGE_SIZE aligned */
119- . = ALIGN(ASM_PAGE_SIZE);
120- .data .vmpages : {
121- *(.data .vm0.pmd)
122- *(.data .vm0.pgd)
123- *(.data .vm0.pte)
133+ /* BSS */
134+ __bss_start = .;
135+ /* page table entries need to be PAGE_SIZE aligned */
136+ . = ALIGN(ASM_PAGE_SIZE);
137+ .data .vmpages : {
138+ *(.data .vm0.pmd)
139+ *(.data .vm0.pgd)
140+ *(.data .vm0.pte)
141+ }
142+ .bss : {
143+ *(.bss )
144+ *(COMMON)
124145 }
125- .bss : { *(.bss ) *(COMMON) }
126- __bss_stop = .;
146+ __bss_stop = .;
127147
128148
129- /* assembler code expects init_task to be 16k aligned */
130- . = ALIGN(16384 ); /* init_task */
131- .data .init_task : { *(.data .init_task) }
149+ /* assembler code expects init_task to be 16k aligned */
150+ . = ALIGN(16384 );
151+ /* init_task */
152+ .data .init_task : {
153+ *(.data .init_task)
154+ }
132155
133- /* The interrupt stack is currently partially coded, but not yet
134- * implemented */
135- . = ALIGN(16384 );
136- init_istack : { *(init_istack) }
156+ /* The interrupt stack is currently partially coded, but not yet
157+ * implemented
158+ */
159+ . = ALIGN(16384 );
160+ init_istack : {
161+ *(init_istack)
162+ }
137163
138164#ifdef CONFIG_64BIT
139- . = ALIGN(16 ); /* Linkage tables */
140- .opd : { *(.opd) } PROVIDE (__gp = .);
141- .plt : { *(.plt) }
142- .dlt : { *(.dlt) }
165+ . = ALIGN(16 );
166+ /* Linkage tables */
167+ .opd : {
168+ *(.opd)
169+ } PROVIDE (__gp = .);
170+ .plt : {
171+ *(.plt)
172+ }
173+ .dlt : {
174+ *(.dlt)
175+ }
143176#endif
144177
145- /* reserve space for interrupt stack by aligning __init* to 16k */
146- . = ALIGN(16384 );
147- __init_begin = .;
148- .init.text : {
149- _sinittext = .;
150- *(.init.text)
151- _einittext = .;
152- }
153- .init.data : { *(.init.data) }
154- . = ALIGN(16 );
155- __setup_start = .;
156- .init.setup : { *(.init.setup) }
157- __setup_end = .;
158- __initcall_start = .;
159- .initcall.init : {
160- INITCALLS
161- }
162- __initcall_end = .;
163- __con_initcall_start = .;
164- .con_initcall.init : { *(.con_initcall.init) }
165- __con_initcall_end = .;
166- SECURITY_INIT
167- /* alternate instruction replacement. This is a mechanism x86 uses
168- * to detect the CPU type and replace generic instruction sequences
169- * with CPU specific ones. We don't currently do this in PA, but
170- * it seems like a good idea... */
171- . = ALIGN(4 );
172- __alt_instructions = .;
173- .altinstructions : { *(.altinstructions) }
174- __alt_instructions_end = .;
175- .altinstr_replacement : { *(.altinstr_replacement) }
176- /* .exit.text is discard at runtime, not link time, to deal with references
177- from .altinstructions and .eh_frame */
178- .exit.text : { *(.exit.text) }
179- .exit.data : { *(.exit.data) }
178+ /* reserve space for interrupt stack by aligning __init* to 16k */
179+ . = ALIGN(16384 );
180+ __init_begin = .;
181+ .init.text : {
182+ _sinittext = .;
183+ *(.init.text)
184+ _einittext = .;
185+ }
186+ .init.data : {
187+ *(.init.data)
188+ }
189+ . = ALIGN(16 );
190+ .init.setup : {
191+ __setup_start = .;
192+ *(.init.setup)
193+ __setup_end = .;
194+ }
195+ .initcall.init : {
196+ __initcall_start = .;
197+ INITCALLS
198+ __initcall_end = .;
199+ }
200+ .con_initcall.init : {
201+ __con_initcall_start = .;
202+ *(.con_initcall.init)
203+ __con_initcall_end = .;
204+ }
205+ SECURITY_INIT
206+
207+ /* alternate instruction replacement. This is a mechanism x86 uses
208+ * to detect the CPU type and replace generic instruction sequences
209+ * with CPU specific ones. We don't currently do this in PA, but
210+ * it seems like a good idea...
211+ */
212+ . = ALIGN(4 );
213+ .altinstructions : {
214+ __alt_instructions = .;
215+ *(.altinstructions)
216+ __alt_instructions_end = .;
217+ }
218+ .altinstr_replacement : {
219+ *(.altinstr_replacement)
220+ }
221+
222+ /* .exit.text is discard at runtime, not link time, to deal with references
223+ * from .altinstructions and .eh_frame
224+ */
225+ .exit.text : {
226+ *(.exit.text)
227+ }
228+ .exit.data : {
229+ *(.exit.data)
230+ }
180231#ifdef CONFIG_BLK_DEV_INITRD
181- . = ALIGN(ASM_PAGE_SIZE);
182- __initramfs_start = .;
183- .init.ramfs : { *(.init.ramfs) }
184- __initramfs_end = .;
232+ . = ALIGN(ASM_PAGE_SIZE);
233+ .init.ramfs : {
234+ __initramfs_start = .;
235+ *(.init.ramfs)
236+ __initramfs_end = .;
237+ }
185238#endif
186239
187- PERCPU(ASM_PAGE_SIZE)
240+ PERCPU(ASM_PAGE_SIZE)
241+ . = ALIGN(ASM_PAGE_SIZE);
242+ __init_end = .;
243+ /* freed after init ends here */
244+ _end = . ;
188245
189- . = ALIGN(ASM_PAGE_SIZE);
190- __init_end = .;
191- /* freed after init ends here */
192-
193- _end = . ;
194-
195- /* Sections to be discarded */
196- /DISCARD/ : {
197- *(.exitcall.exit)
246+ /* Sections to be discarded */
247+ /DISCARD/ : {
248+ *(.exitcall.exit)
198249#ifdef CONFIG_64BIT
199- /* temporary hack until binutils is fixed to not emit these
200- for static binaries */
201- *(.interp)
202- *(.dynsym)
203- *(.dynstr)
204- *(.dynamic)
205- *(.hash)
206- *(.gnu.hash)
250+ /* temporary hack until binutils is fixed to not emit these
251+ * for static binaries
252+ */
253+ *(.interp)
254+ *(.dynsym)
255+ *(.dynstr)
256+ *(.dynamic)
257+ *(.hash)
258+ *(.gnu.hash)
207259#endif
208260 }
209261
210- STABS_DEBUG
211- .note 0 : { *(.note) }
212-
262+ STABS_DEBUG
263+ .note 0 : { *(.note) }
213264}
0 commit comments