Message ID | 20181210222854.21156-4-joel@jms.id.au (mailing list archive) |
---|---|
State | Rejected |
Headers | show |
Series | powerpc: Add to linker script discards | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | next/apply_patch Successfully applied |
snowpatch_ozlabs/build-ppc64le | success | build succeded & removed 0 sparse warning(s) |
snowpatch_ozlabs/build-ppc64be | success | build succeded & removed 0 sparse warning(s) |
snowpatch_ozlabs/build-ppc64e | success | build succeded & removed 0 sparse warning(s) |
snowpatch_ozlabs/build-pmac32 | success | build succeded & removed 0 sparse warning(s) |
snowpatch_ozlabs/checkpatch | warning | total: 0 errors, 1 warnings, 0 checks, 14 lines checked |
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index 2c93a420f456..af0f81df8bb9 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S @@ -316,7 +316,6 @@ SECTIONS DATA_DATA *(.data.rel*) *(.toc1) - *(.branch_lt) } .opd : AT(ADDR(.opd) - LOAD_OFFSET) { @@ -388,6 +387,7 @@ SECTIONS *(.hash .gnu.hash) *(.interp) *(.dynstr) + *(.branch_lt) #ifndef CONFIG_PPC32 *(.dynsym) #endif
When building a 32 bit powerpc kernel with Binutils 2.31.1 this warning is emitted: powerpc-linux-gnu-ld: warning: orphan section `.branch_lt' from `arch/powerpc/kernel/head_44x.o' being placed in section `.branch_lt' As of binutils commit 2d7ad24e8726 ("Support PLT16 relocs against local symbols")[1], 32 bit targets can produce .branch_lt sections in their output. These sections should be empty for the kernel build so discard them for both PPC64 and PPC32. [1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=2d7ad24e8726ba4c45c9e67be08223a146a837ce Signed-off-by: Joel Stanley <joel@jms.id.au> --- v2: Discard instead of keep. Alan said "[discarding] can be a recipe for finding linker bugs", so lets go with that. --- arch/powerpc/kernel/vmlinux.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)