arm64: vmlinux.lds: account for spurious empty .igot.plt sections
PATCH 1/1 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.
--- arch/arm64/kernel/vmlinux.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kernel/vmlinux.lds.S +1 -1
@@ -278,7 +278,7 @@ SECTIONS * explicitly check instead of blindly discarding. */ .plt : { - *(.plt) *(.plt.*) *(.iplt) *(.igot) + *(.plt) *(.plt.*) *(.iplt) *(.igot .igot.plt) } ASSERT(SIZEOF(.plt) == 0, "Unexpected run-time procedure linkages detected!")
Signature · 7 lines
2.17.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 8 lines · Ard Biesheuvel
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'[...]
Applied to arm64 (for-next/fixes), thanks!
[1/1] arm64: vmlinux.lds: account for spurious empty .igot.plt sections
https://git.kernel.org/arm64/c/5f692a81b4e9
Cheers,
Signature · 10 lines
Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 7 lines · Ard Biesheuvel
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'
Quoted 6 lines
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"?
Quoted 5 lines
Cc Jessica Yu <[email protected]>Cc Kees Cook <[email protected]>Cc Geert Uytterhoeven <[email protected]>Cc Nick Desaulniers <[email protected]>Signed-off-by Ard Biesheuvel <[email protected]>
Thanks! Any idea what causes this?
Though I think Will already snagged the patch :)
Signature · 6 lines
Kees Cook _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 9 lines · Kees Cook
Quoted 7 lines · Ard Biesheuvel
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'
Quoted 9 lines
Quoted 6 lines
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.
Quoted 8 lines
Quoted 5 lines
Cc Jessica Yu <[email protected]>Cc Kees Cook <[email protected]>Cc Geert Uytterhoeven <[email protected]>Cc Nick Desaulniers <[email protected]>Signed-off-by Ard Biesheuvel <[email protected]>Thanks! Any idea what causes this?
Not a clue.
Quoted 2 lines
Reviewed-by Kees Cook <[email protected]>
Thanks,
Quoted 4 lines
Though I think Will already snagged the patch :)
--
Kees Cook
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Will Deacon
maintainerQuoted 23 lines · Kees Cook
Quoted 7 lines · Ard Biesheuvel
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'Quoted 6 lines
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"?
Quoted 5 lines
Cc Jessica Yu <[email protected]>Cc Kees Cook <[email protected]>Cc Geert Uytterhoeven <[email protected]>Cc Nick Desaulniers <[email protected]>Signed-off-by Ard Biesheuvel <[email protected]>
Quoted 5 lines
Thanks! Any idea what causes this?
Reviewed-by Kees Cook <[email protected]>Though I think Will already snagged the patch :)
Yeah, sorry -- I was keen to get rid of that annoying warning!
Will
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel