aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2006-03-08 09:13:04 -0500
committerRalf Baechle <ralf@linux-mips.org>2006-03-09 13:05:09 -0500
commitbb7d83f74477b41a2dee71771805c8447cdaa70f (patch)
tree27ec3663ce4488fee15b48136eb173ff65b370f9 /arch/mips/kernel
parentec28f3065795ed3be7413368efd7f63d7b81e82d (diff)
[MIPS] Discard .exit.text at runtime.
At times gcc will place bits of __exit functions into .rodata. If compiled into the kernle itself we used to discard .exit.text - but not the bits left in .rodata. While harmless this did at times result in a large number of warnings. So until gcc fixes this, discard .exit.text at runtime. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r--arch/mips/kernel/vmlinux.lds.S4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index ff699dbb99f7..2ad0cedf29fe 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -106,6 +106,9 @@ SECTIONS
106 .con_initcall.init : { *(.con_initcall.init) } 106 .con_initcall.init : { *(.con_initcall.init) }
107 __con_initcall_end = .; 107 __con_initcall_end = .;
108 SECURITY_INIT 108 SECURITY_INIT
109 /* .exit.text is discarded at runtime, not link time, to deal with
110 references from .rodata */
111 .exit.text : { *(.exit.text) }
109 . = ALIGN(_PAGE_SIZE); 112 . = ALIGN(_PAGE_SIZE);
110 __initramfs_start = .; 113 __initramfs_start = .;
111 .init.ramfs : { *(.init.ramfs) } 114 .init.ramfs : { *(.init.ramfs) }
@@ -133,7 +136,6 @@ SECTIONS
133 136
134 /* Sections to be discarded */ 137 /* Sections to be discarded */
135 /DISCARD/ : { 138 /DISCARD/ : {
136 *(.exit.text)
137 *(.exit.data) 139 *(.exit.data)
138 *(.exitcall.exit) 140 *(.exitcall.exit)
139 141