]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: vmlinux.lds: account for spurious empty .igot.plt sections
authorArd Biesheuvel <ardb@kernel.org>
Wed, 28 Oct 2020 13:33:32 +0000 (14:33 +0100)
committerWill Deacon <will@kernel.org>
Wed, 28 Oct 2020 13:44:24 +0000 (13:44 +0000)
commitfcb402b6f2f2bfb8798492fe74368b45ca740783
tree953e23562bf5611e3154fddd85fd902fc9432690
parent539c4ba21d58f5d56e6654f9d5efc9784a75dc31
arm64: vmlinux.lds: account for spurious empty .igot.plt sections

Now that we started making the linker warn about orphan sections
(input sections that are not explicitly consumed by an output section),
some configurations produce the following warning:

  aarch64-linux-gnu-ld: warning: orphan section `.igot.plt' from
         `arch/arm64/kernel/head.o' being placed in section `.igot.plt'

It could be any file that triggers this - head.o is simply the first
input file in the link - and the resulting .igot.plt section never
actually appears in vmlinux as it turns out to be empty.

So let's add .igot.plt to our collection of input sections to disregard
unless they are empty.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Cc: Jessica Yu <jeyu@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Link: https://lore.kernel.org/r/20201028133332.5571-1-ardb@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/vmlinux.lds.S