From: Ralf Baechle Date: Wed, 8 Mar 2006 14:13:04 +0000 (+0000) Subject: [MIPS] Discard .exit.text at runtime. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bb7d83f74477b41a2dee71771805c8447cdaa70f;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 --- 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 .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) } @@ -133,7 +136,6 @@ SECTIONS /* Sections to be discarded */ /DISCARD/ : { - *(.exit.text) *(.exit.data) *(.exitcall.exit)