linux-stable/arch
Nathan Chancellor cb5a170e97 powerpc: Handle .text.{hot,unlikely}.* in linker script
commit 3ce47d95b7 upstream.

Commit eff8728fe6 ("vmlinux.lds.h: Add PGO and AutoFDO input
sections") added ".text.unlikely.*" and ".text.hot.*" due to an LLVM
change [1].

After another LLVM change [2], these sections are seen in some PowerPC
builds, where there is a orphan section warning then build failure:

$ make -skj"$(nproc)" \
       ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- LLVM=1 O=out \
       distclean powernv_defconfig zImage.epapr
ld.lld: warning: kernel/built-in.a(panic.o):(.text.unlikely.) is being placed in '.text.unlikely.'
...
ld.lld: warning: address (0xc000000000009314) of section .text is not a multiple of alignment (256)
...
ERROR: start_text address is c000000000009400, should be c000000000008000
ERROR: try to enable LD_HEAD_STUB_CATCH config option
ERROR: see comments in arch/powerpc/tools/head_check.sh
...

Explicitly handle these sections like in the main linker script so
there is no more build failure.

[1]: https://reviews.llvm.org/D79600
[2]: https://reviews.llvm.org/D92493

Fixes: 83a092cf95 ("powerpc: Link warning for orphan sections")
Cc: stable@vger.kernel.org
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://github.com/ClangBuiltLinux/linux/issues/1218
Link: https://lore.kernel.org/r/20210104205952.1399409-1-natechancellor@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-12 20:18:17 +01:00
..
alpha local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
arc local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
arm local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
arm64 local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
c6x
csky local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
h8300 local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
hexagon local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
ia64 local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
m68k local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
microblaze local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
mips local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
nds32 local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
nios2 sched/idle: Fix arch_cpu_idle() vs tracing 2020-11-24 16:47:35 +01:00
openrisc sched/idle: Fix arch_cpu_idle() vs tracing 2020-11-24 16:47:35 +01:00
parisc local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
powerpc powerpc: Handle .text.{hot,unlikely}.* in linker script 2021-01-12 20:18:17 +01:00
riscv local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
s390 local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
sh local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
sparc local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
um um: ubd: Submit all data segments atomically 2021-01-06 14:56:55 +01:00
x86 local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
xtensa local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
.gitignore
Kconfig Revert: "ring-buffer: Remove HAVE_64BIT_ALIGNED_ACCESS" 2020-12-30 11:54:29 +01:00