linux/arch/powerpc/kernel
Michael Ellerman a783d7f7cb powerpc/vmlinux.lds: Don't discard .rela* for relocatable builds
commit 07b050f929 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 99cb0d917f ("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: 99cb0d917f ("arch: fix broken BuildID for arm64 and riscv")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20230105132349.384666-2-mpe@ellerman.id.au
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tom Saeger <tom.saeger@oracle.com>
2023-02-25 11:25:42 +01:00
..
ptrace
syscalls powerpc/32: fix syscall wrappers with 64-bit arguments 2022-11-01 10:24:09 +11:00
trace powerpc/64: provide a helper macro to load r2 with the kernel TOC 2022-09-28 19:22:12 +10:00
vdso powerpc: Drops STABS_DEBUG from linker scripts 2022-09-30 18:35:52 +10:00
.gitignore
85xx_entry_mapping.S powerpc: Remove CONFIG_FSL_BOOKE 2022-09-26 22:47:37 +10:00
align.c
asm-offsets.c powerpc: Remove CONFIG_PPC_FSL_BOOK3E 2022-09-26 23:00:13 +10:00
audit.c
btext.c
cacheinfo.c
cacheinfo.h
compat_audit.c
cpu_setup_6xx.S
cpu_setup_44x.S
cpu_setup_e500.S powerpc: Remove CONFIG_PPC_BOOK3E_MMU 2022-09-26 23:00:14 +10:00
cpu_setup_pa6t.S
cpu_setup_power.c powerpc/cputable: Move __cpu_setup() prototypes out of cputable.h 2022-09-26 22:26:49 +10:00
cpu_setup_ppc970.S
cpu_specs_8xx.h powerpc/cputable: Split cpu_specs[] out of cputable.h 2022-09-26 22:47:13 +10:00
cpu_specs_40x.h powerpc/cputable: Split cpu_specs[] out of cputable.h 2022-09-26 22:47:13 +10:00
cpu_specs_44x.h powerpc/cputable: Split cpu_specs[] out of cputable.h 2022-09-26 22:47:13 +10:00
cpu_specs_47x.h powerpc/cputable: Split cpu_specs[] out of cputable.h 2022-09-26 22:47:13 +10:00
cpu_specs_85xx.h powerpc/cputable: Split cpu_specs[] for mpc85xx and e500mc 2022-09-26 23:00:05 +10:00
cpu_specs_book3s_32.h powerpc/cputable: Split cpu_specs[] out of cputable.h 2022-09-26 22:47:13 +10:00
cpu_specs_book3s_64.h powerpc/cputable: Split cpu_specs[] out of cputable.h 2022-09-26 22:47:13 +10:00
cpu_specs_e500mc.h powerpc/cputable: Split cpu_specs[] for mpc85xx and e500mc 2022-09-26 23:00:05 +10:00
cpu_specs.h powerpc/cputable: Split cpu_specs[] for mpc85xx and e500mc 2022-09-26 23:00:05 +10:00
cputable.c powerpc/cputable: Split cpu_specs[] out of cputable.h 2022-09-26 22:47:13 +10:00
crash_dump.c
dawr.c
dbell.c powerpc/64: Fix perf profiling asynchronous interrupt handlers 2023-02-22 12:59:43 +01:00
dma-iommu.c
dma-mask.c
dma-swiotlb.c
dt_cpu_ftrs.c powerpc: move from strlcpy with unused retval to strscpy 2022-08-26 11:02:20 +10:00
early_32.c
eeh_cache.c
eeh_driver.c
eeh_event.c
eeh_pe.c
eeh_sysfs.c
eeh.c
entry_32.S powerpc/64: use 32-bit immediate for STACK_FRAME_REGS_MARKER 2022-09-28 19:22:12 +10:00
entry_64.S powerpc: Remove CONFIG_PPC_BOOK3E 2022-09-26 23:00:13 +10:00
epapr_hcalls.S
epapr_paravirt.c
exceptions-64e.S powerpc/64/interrupt: Prevent NMI PMI causing a dangerous warning 2022-10-18 22:46:19 +11:00
exceptions-64s.S powerpc/64s/interrupt: Perf NMI should not take normal exit path 2022-10-18 22:46:19 +11:00
fadump.c
firmware.c
fpu.S
head_8xx.S
head_32.h
head_40x.S
head_44x.S
head_64.S bitmap patches for v6.1-rc1 2022-10-10 12:49:34 -07:00
head_85xx.S powerpc: Change CONFIG_E500 to CONFIG_PPC_E500 2022-09-26 23:00:13 +10:00
head_book3s_32.S
head_booke.h powerpc: Remove CONFIG_PPC_BOOK3E_MMU 2022-09-26 23:00:14 +10:00
hw_breakpoint_constraints.c
hw_breakpoint.c powerpc/hw_breakpoint: Avoid relying on caller synchronization 2022-08-30 10:56:23 +02:00
idle_6xx.S
idle_64e.S powerpc: add ISA v3.0 / v3.1 wait opcode macro 2022-09-28 19:22:10 +10:00
idle_85xx.S powerpc: Cleanup idle for e500 2022-09-26 23:00:14 +10:00
idle_book3s.S
idle.c
ima_arch.c
interrupt_64.S powerpc/64s/interrupt: Fix clear of PACA_IRQS_HARD_DIS when returning to soft-masked context 2022-10-27 00:38:35 +11:00
interrupt.c powerpc/64s/interrupt: Fix interrupt exit race with security mitigation switch 2023-02-14 19:11:53 +01:00
io-workarounds.c
io.c
iomap.c
iommu.c
irq_64.c powerpc/64/irq: tidy soft-masked irq replay and improve documentation 2022-09-28 19:22:11 +10:00
irq.c powerpc/64: Fix perf profiling asynchronous interrupt handlers 2023-02-22 12:59:43 +01:00
isa-bridge.c
jump_label.c
kdebugfs.c
kgdb.c powerpc: Remove CONFIG_FSL_BOOKE 2022-09-26 22:47:37 +10:00
kprobes-ftrace.c
kprobes.c powerpc/kprobes: Fix null pointer reference in arch_prepare_kprobe() 2022-09-28 22:19:52 +10:00
kvm_emul.S
kvm.c powerpc: Remove CONFIG_PPC_BOOK3E_MMU 2022-09-26 23:00:14 +10:00
l2cr_6xx.S
legacy_serial.c powerpc/kernel: Add missing of_node_put() in legacy_serial.c 2022-09-05 17:28:26 +10:00
Makefile powerpc/32: fix syscall wrappers with 64-bit arguments of unaligned register-pairs 2022-10-13 00:49:58 +11:00
mce_power.c
mce.c
misc_32.S
misc_64.S powerpc: Remove CONFIG_PPC_BOOK3E 2022-09-26 23:00:13 +10:00
misc.S
module_32.c
module_64.c
module.c
msi.c
note.S
nvram_64.c
of_platform.c
optprobes_head.S powerpc/64: provide a helper macro to load r2 with the kernel TOC 2022-09-28 19:22:12 +10:00
optprobes.c
paca.c powerpc: Remove CONFIG_PPC_BOOK3E 2022-09-26 23:00:13 +10:00
pci_32.c powerpc/pci: Enable PCI domains in /proc when PCI bus numbers are not unique 2022-08-25 17:47:08 +10:00
pci_64.c
pci_dn.c powerpc/pci_dn: Add missing of_node_put() 2022-09-05 17:30:25 +10:00
pci_of_scan.c
pci-common.c powerpc/pci-common: Fix refcount bug for 'phb->dn' 2022-09-05 17:30:29 +10:00
pci-hotplug.c
pmc.c
ppc_save_regs.S
proc_powerpc.c
process.c Random number generator fixes for Linux 6.1-rc1. 2022-10-16 15:27:07 -07:00
prom_init_check.sh powerpc/64: Remove unused prom_init_toc symbols 2022-09-26 20:58:16 +10:00
prom_init.c powerpc/prom_init: drop PROM_BUG() 2022-09-26 20:58:18 +10:00
prom_parse.c
prom.c powerpc: Add device-tree model to the hardware description 2022-09-30 18:35:53 +10:00
reloc_32.S
reloc_64.S powerpc/64: avoid using r13 in relocate 2022-09-28 19:22:13 +10:00
rtas_entry.S powerpc/rtas: Fix RTAS MSR[HV] handling for Cell 2022-08-26 08:41:54 +10:00
rtas_flash.c
rtas_pci.c
rtas-proc.c
rtas-rtc.c
rtas.c powerpc/rtas: avoid scheduling in rtas_os_term() 2023-01-04 11:28:58 +01:00
rtasd.c
secure_boot.c
security.c powerpc: Remove CONFIG_PPC_FSL_BOOK3E 2022-09-26 23:00:13 +10:00
secvar-ops.c
secvar-sysfs.c
setup_32.c powerpc: Change CONFIG_E500 to CONFIG_PPC_E500 2022-09-26 23:00:13 +10:00
setup_64.c powerpc/64s/interrupt: halt early boot interrupts if paca is not set up 2022-09-28 19:22:13 +10:00
setup-common.c powerpc: Add hardware description string 2022-09-30 18:35:52 +10:00
setup.h powerpc: Remove CONFIG_PPC_BOOK3E 2022-09-26 23:00:13 +10:00
signal_32.c powerpc: Include all arch-specific syscall prototypes 2022-09-28 19:22:08 +10:00
signal_64.c
signal.c
signal.h powerpc: Don't add __powerpc_ prefix to syscall entry points 2022-10-07 00:59:54 +11:00
smp-tbsync.c
smp.c powerpc/smp: poll cpu_callin_map more aggressively in __cpu_up() 2022-09-28 19:22:14 +10:00
stacktrace.c
static_call.c
suspend.c
swsusp_32.S
swsusp_64.c
swsusp_85xx.S powerpc: Remove CONFIG_FSL_BOOKE 2022-09-26 22:47:37 +10:00
swsusp_asm64.S powerpc/64: asm use consistent global variable declaration and access 2022-09-28 19:22:12 +10:00
swsusp.c
sys_ppc32.c powerpc/32: fix syscall wrappers with 64-bit arguments 2022-11-01 10:24:09 +11:00
syscall.c powerpc: Provide syscall wrapper 2022-09-28 19:22:09 +10:00
syscalls.c powerpc: Adopt SYSCALL_DEFINE for arch-specific syscall handlers 2022-09-28 19:22:08 +10:00
sysfs.c powerpc: Remove CONFIG_PPC_FSL_BOOK3E 2022-09-26 23:00:13 +10:00
systbl.c powerpc: Don't add __powerpc_ prefix to syscall entry points 2022-10-07 00:59:54 +11:00
tau_6xx.c
time.c powerpc/64: Fix perf profiling asynchronous interrupt handlers 2023-02-22 12:59:43 +01:00
tm.S
traps.c powerpc/64s: early boot machine check handler 2022-09-28 19:22:13 +10:00
ucall.S
udbg_16550.c powerpc: Add support for early debugging via Serial 16550 console 2022-09-28 19:22:09 +10:00
udbg.c powerpc: Add support for early debugging via Serial 16550 console 2022-09-28 19:22:09 +10:00
uprobes.c
vdso.c - Yu Zhao's Multi-Gen LRU patches are here. They've been under test in 2022-10-10 17:53:04 -07:00
vdso32_wrapper.S
vdso64_wrapper.S
vecemu.c
vector.S powerpc/64: asm use consistent global variable declaration and access 2022-09-28 19:22:12 +10:00
vmlinux.lds.S powerpc/vmlinux.lds: Don't discard .rela* for relocatable builds 2023-02-25 11:25:42 +01:00
watchdog.c