[PATCH] arm64: vmlinux.lds: account for spurious empty .igot.plt sections

Ard Biesheuvel ardb at kernel.org
Wed Oct 28 11:58:09 EDT 2020


On Wed, 28 Oct 2020 at 16:56, Kees Cook <keescook at chromium.org> wrote:
>
> On Wed, Oct 28, 2020 at 02:33:32PM +0100, Ard Biesheuvel wrote:
> > 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.
>
> typo: "non-empty"?
>

Indeed.

> > Cc: Jessica Yu <jeyu at kernel.org>
> > Cc: Kees Cook <keescook at chromium.org>
> > Cc: Geert Uytterhoeven <geert at linux-m68k.org>
> > Cc: Nick Desaulniers <ndesaulniers at google.com>
> > Signed-off-by: Ard Biesheuvel <ardb at kernel.org>
>
> Thanks! Any idea what causes this?
>

Not a clue.

> Reviewed-by: Kees Cook <keescook at chromium.org>
>

Thanks,

> Though I think Will already snagged the patch :)
>
> --
> Kees Cook



More information about the linux-arm-kernel mailing list