]> git.baikalelectronics.ru Git - kernel.git/commitdiff
hexagon: use common DISCARDS macro
authorNathan Chancellor <nathan@kernel.org>
Thu, 8 Jul 2021 01:07:41 +0000 (18:07 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 8 Jul 2021 18:48:20 +0000 (11:48 -0700)
ld.lld warns that the '.modinfo' section is not currently handled:

ld.lld: warning: kernel/built-in.a(workqueue.o):(.modinfo) is being placed in '.modinfo'
ld.lld: warning: kernel/built-in.a(printk/printk.o):(.modinfo) is being placed in '.modinfo'
ld.lld: warning: kernel/built-in.a(irq/spurious.o):(.modinfo) is being placed in '.modinfo'
ld.lld: warning: kernel/built-in.a(rcu/update.o):(.modinfo) is being placed in '.modinfo'

The '.modinfo' section was added in commit a8d6dd7a2b50 ("moduleparam:
Save information about built-in modules in separate file") to the DISCARDS
macro but Hexagon has never used that macro.  The unification of DISCARDS
happened in commit 0944eea1f88f ("linker script: unify usage of discard
definition") in 2009, prior to Hexagon being added in 2011.

Switch Hexagon over to the DISCARDS macro so that anything that is
expected to be discarded gets discarded.

Link: https://lkml.kernel.org/r/20210521011239.1332345-3-nathan@kernel.org
Fixes: a37c15d64572 ("Hexagon: Add configuration and makefiles for the Hexagon architecture.")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Acked-by: Brian Cain <bcain@codeaurora.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Oliver Glitta <glittao@gmail.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/hexagon/kernel/vmlinux.lds.S

index 20f19539c5fcce5abbad1f17aa0cfde3e693e85a..57465bff1fe49717cbf0b68280bae499e337b9d7 100644 (file)
@@ -61,14 +61,9 @@ SECTIONS
 
        _end = .;
 
-       /DISCARD/ : {
-               EXIT_TEXT
-               EXIT_DATA
-               EXIT_CALL
-       }
-
        STABS_DEBUG
        DWARF_DEBUG
        ELF_DETAILS
 
+       DISCARDS
 }