android_kernel_motorola_sm6375/arch/powerpc
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Michael Ellerman 219cc98501 powerpc/vmlinux.lds: Don't discard .rela* for relocatable builds
commit 07b050f9290ee012a407a0f64151db902a1520f5 upstream.

Relocatable kernels must not discard relocations, they need to be
processed at runtime. As such they are included for CONFIG_RELOCATABLE
builds in the powerpc linker script (line 340).

However they are also unconditionally discarded later in the
script (line 414). Previously that worked because the earlier inclusion
superseded the discard.

However commit 99cb0d917ffa ("arch: fix broken BuildID for arm64 and
riscv") introduced an earlier use of DISCARD as part of the RO_DATA
macro (line 137). With binutils < 2.36 that causes the DISCARD
directives later in the script to be applied earlier, causing .rela* to
actually be discarded at link time, leading to build warnings and a
kernel that doesn't boot:

  ld: warning: discarding dynamic section .rela.init.rodata

Fix it by conditionally discarding .rela* only when CONFIG_RELOCATABLE
is disabled.

Fixes: 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv")
Signed-off-by: Michael Ellerman <[email protected]>

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Tom Saeger <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-03-17 08:32:53 +01:00
..
boot powerpc: dts: t208x: Disable 10G on MAC1 and MAC2 2023-02-25 11:53:26 +01:00
configs
crypto
include powerpc/imc-pmu: Fix use of mutex in IRQs disabled section 2023-01-18 11:42:03 +01:00
kernel powerpc/vmlinux.lds: Don't discard .rela* for relocatable builds 2023-03-17 08:32:53 +01:00
kvm KVM: PPC: Fix TCE handling for VFIO 2022-04-27 13:50:49 +02:00
lib powerpc/lib/sstep: Fix build errors with newer binutils 2022-04-15 14:18:25 +02:00
math-emu powerpc/math_emu/efp: Include module.h 2022-10-26 13:22:44 +02:00
mm powerpc/ptdump: Fix display of RW pages on FSL_BOOK3E 2022-08-25 11:17:25 +02:00
net
oprofile
perf powerpc/imc-pmu: Revert nest_init_lock to being a mutex 2023-02-22 12:50:29 +01:00
platforms powerpc/pseries/lparcfg: add missing RTAS retry status handling 2023-03-11 16:43:51 +01:00
purgatory
sysdev powerpc/xive: add missing iounmap() in error path in xive_spapr_populate_irq_data() 2023-01-18 11:41:30 +01:00
tools
xmon
Kbuild
Kconfig
Kconfig.debug
Makefile powerpc: Remove linker flag from KBUILD_AFLAGS 2023-03-11 16:43:53 +01:00
Makefile.postlink