[PATCH 2/4] x86: Cleanup vdso-layout.lds.S
From: Petr Tesarik
Date: Thu May 14 2009 - 09:06:55 EST
Make the following changes:
- move linker-generated sections out of .data
- add all (even theoretically) possible rodata, data and text input
sections to their respective output sections
- discard .altinstructions and .altinstr_replacements
Since the .altinstructions section is currently not used anyway, this
is a pure cleanup.
Signed-off-by: Petr Tesarik <ptesarik@xxxxxxx>
---
arch/x86/vdso/vdso-layout.lds.S | 25 ++++++++++++++++++-------
1 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/arch/x86/vdso/vdso-layout.lds.S b/arch/x86/vdso/vdso-layout.lds.S
index 634a2cf..aaa3026 100644
--- a/arch/x86/vdso/vdso-layout.lds.S
+++ b/arch/x86/vdso/vdso-layout.lds.S
@@ -21,29 +21,40 @@ SECTIONS
.eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr
.eh_frame : { KEEP (*(.eh_frame)) } :text
+ /* Linker-generated sections */
.dynamic : { *(.dynamic) } :text :dynamic
+ .got : { *(.got) } :text
+ .got.plt : { *(.got.plt) }
+ .dynbss : { *(.dynbss) }
- .rodata : { *(.rodata*) } :text
+ .rodata : {
+ *(.rodata*)
+ *(.gnu.linkonce.r.*)
+ }
.data : {
*(.data*)
*(.sdata*)
- *(.got.plt) *(.got)
*(.gnu.linkonce.d.*)
*(.bss*)
- *(.dynbss*)
+ *(.sbss*)
*(.gnu.linkonce.b.*)
}
- .altinstructions : { *(.altinstructions) }
- .altinstr_replacement : { *(.altinstr_replacement) }
-
/*
* Align the actual code well away from the non-instruction data.
* This is the best thing for the I-cache.
*/
. = ALIGN(0x100);
- .text : { *(.text*) } :text =0x90909090
+ .text : {
+ *(.text*)
+ *(.gnu.linkonce.t.*)
+ } :text =0x90909090
+
+ /DISCARD/ : {
+ *(.altinstructions)
+ *(.altinstr_replacement)
+ }
}
/*
--
1.6.0.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/