Skip to content

Commit

Permalink
[MIPS] Discard .exit.text at runtime.
Browse files Browse the repository at this point in the history
    
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>
  • Loading branch information
Ralf Baechle committed Mar 9, 2006
1 parent ec28f30 commit bb7d83f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/mips/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ SECTIONS
.con_initcall.init : { *(.con_initcall.init) }
__con_initcall_end = .;
SECURITY_INIT
/* .exit.text is discarded at runtime, not link time, to deal with
references from .rodata */
.exit.text : { *(.exit.text) }
. = ALIGN(_PAGE_SIZE);
__initramfs_start = .;
.init.ramfs : { *(.init.ramfs) }
Expand Down Expand Up @@ -133,7 +136,6 @@ SECTIONS

/* Sections to be discarded */
/DISCARD/ : {
*(.exit.text)
*(.exit.data)
*(.exitcall.exit)

Expand Down

0 comments on commit bb7d83f

Please sign in to comment.