MIPS: vmlinux.lds.S: add ".gnu.attributes" to DISCARDS
authorAlexander Lobakin <alobakin@pm.me>
Sun, 10 Jan 2021 11:56:22 +0000 (11:56 +0000)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Fri, 15 Jan 2021 14:27:54 +0000 (15:27 +0100)
Discard GNU attributes (MIPS FP type, GNU Hash etc.) at link time
as kernel doesn't use it at all.
Solves a dozen of the following ld warnings (one per every file):

mips-alpine-linux-musl-ld: warning: orphan section `.gnu.attributes'
from `arch/mips/kernel/head.o' being placed in section
`.gnu.attributes'
mips-alpine-linux-musl-ld: warning: orphan section `.gnu.attributes'
from `init/main.o' being placed in section `.gnu.attributes'

Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/kernel/vmlinux.lds.S

index ae1d0b4bdd60a04b0c3503554bcf74e91c7fc436..09669a8fddecf56b5947865afef3f4bc4415bcf3 100644 (file)
@@ -220,6 +220,7 @@ SECTIONS
                /* ABI crap starts here */
                *(.MIPS.abiflags)
                *(.MIPS.options)
+               *(.gnu.attributes)
                *(.options)
                *(.pdr)
                *(.reginfo)