1
0
Fork 0
alistair23-linux/arch/powerpc
Nathan Chancellor c511f27e13 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:16:17 +01:00
..
boot powerpc/boot: Fix CONFIG_PPC_MPC52XX references 2020-08-19 08:16:17 +02:00
configs vgacon: remove software scrollback support 2020-09-17 13:47:54 +02:00
crypto treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
include powerpc/bitops: Fix possible undefined behaviour with fls() and fls64() 2021-01-06 14:48:36 +01:00
kernel powerpc: Handle .text.{hot,unlikely}.* in linker script 2021-01-12 20:16:17 +01:00
kvm KVM: PPC: Book3S HV: XIVE: Fix possible oops when accessing ESB page 2020-12-02 08:49:46 +01:00
lib powerpc/64s: flush L1D after user accesses 2020-11-22 10:14:10 +01:00
math-emu treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
mm powerpc/mm: Fix verification of MMU_FTR_TYPE_44x 2020-12-30 11:51:39 +01:00
net powerpc/bpf: Fix tail call implementation 2019-11-02 00:32:26 +01:00
oprofile treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 333 2019-06-05 17:37:06 +02:00
perf powerpc/perf: Exclude kernel samples while counting events in user space. 2020-12-30 11:51:35 +01:00
platforms powerpc/powernv/memtrace: Fix crashing the kernel when enabling concurrently 2020-12-30 11:51:39 +01:00
purgatory treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
sysdev powerpc: sysdev: add missing iounmap() on error in mpic_msgr_probe() 2021-01-06 14:48:39 +01:00
tools powerpc: Do not consider weak unresolved symbol relocations as bad 2020-02-24 08:37:00 +01:00
xmon powerpc/xmon: Change printk() to pr_cont() 2020-12-30 11:51:39 +01:00
Kbuild treewide: Add SPDX license identifier - Kbuild 2019-05-30 11:32:33 -07:00
Kconfig powerpc/rtas: Restrict RTAS requests from userspace 2020-11-05 11:43:30 +01:00
Kconfig.debug powerpc/ptdump: Only enable PPC_CHECK_WX with STRICT_KERNEL_RWX 2020-02-14 16:34:16 -05:00
Makefile powerpc: Drop -me200 addition to build flags 2020-12-16 10:56:55 +01:00
Makefile.postlink powerpc: Do not consider weak unresolved symbol relocations as bad 2020-02-24 08:37:00 +01:00