Commit bb7d83f7 authored by Ralf Baechle's avatar Ralf Baechle

[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: default avatarRalf Baechle <ralf@linux-mips.org>
parent ec28f306
...@@ -106,6 +106,9 @@ SECTIONS ...@@ -106,6 +106,9 @@ SECTIONS
.con_initcall.init : { *(.con_initcall.init) } .con_initcall.init : { *(.con_initcall.init) }
__con_initcall_end = .; __con_initcall_end = .;
SECURITY_INIT SECURITY_INIT
/* .exit.text is discarded at runtime, not link time, to deal with
references from .rodata */
.exit.text : { *(.exit.text) }
. = ALIGN(_PAGE_SIZE); . = ALIGN(_PAGE_SIZE);
__initramfs_start = .; __initramfs_start = .;
.init.ramfs : { *(.init.ramfs) } .init.ramfs : { *(.init.ramfs) }
...@@ -133,7 +136,6 @@ SECTIONS ...@@ -133,7 +136,6 @@ SECTIONS
/* Sections to be discarded */ /* Sections to be discarded */
/DISCARD/ : { /DISCARD/ : {
*(.exit.text)
*(.exit.data) *(.exit.data)
*(.exitcall.exit) *(.exitcall.exit)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment