linux-yocto/arch/riscv
Fangrui Song 70685fb621 riscv: vdso: Exclude .rodata from the PT_DYNAMIC segment
[ Upstream commit e0eb1b6b0c ]

.rodata is implicitly included in the PT_DYNAMIC segment due to
inheriting the segment of the preceding .dynamic section (in both GNU ld
and LLD).  When the .rodata section's size is not a multiple of 16
bytes on riscv64, llvm-readelf will report a "PT_DYNAMIC dynamic table
is invalid" warning.  Note: in the presence of the .dynamic section, GNU
readelf and llvm-readelf's -d option decodes the dynamic section using
the section.

This issue arose after commit 8f8c1ff879
("riscv: vdso.lds.S: remove hardcoded 0x800 .text start addr"), which
placed .rodata directly after .dynamic by removing .eh_frame.

This patch resolves the implicit inclusion into PT_DYNAMIC by explicitly
specifying the :text output section phdr.

Reported-by: Nathan Chancellor <nathan@kernel.org>
Closes: https://github.com/ClangBuiltLinux/linux/issues/2093
Signed-off-by: Fangrui Song <i@maskray.me>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20250602-riscv-vdso-v1-1-0620cf63cff0@maskray.me
Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-07-17 18:37:22 +02:00
..
boot riscv: dts: sophgo: fix DMA data-width configuration for CV18xx 2025-05-22 14:29:35 +02:00
configs timekeeping: Remove CONFIG_DEBUG_TIMEKEEPING 2024-12-14 20:04:16 +01:00
crypto crypto: lib/Kconfig - Hide arch options from user 2025-05-02 07:59:32 +02:00
errata RISC-V: errata: Use medany for relocatable builds 2025-04-10 14:39:32 +02:00
include riscv/atomic: Do proper sign extension also for unsigned in arch_cmpxchg 2025-07-06 11:01:49 +02:00
kernel riscv: vdso: Exclude .rodata from the PT_DYNAMIC segment 2025-07-17 18:37:22 +02:00
kvm RISC-V: KVM: Don't treat SBI HFENCE calls as NOPs 2025-06-27 11:11:45 +01:00
lib Merge patch series "riscv: Improve KASAN coverage to fix unit tests" 2024-09-19 01:10:44 -07:00
mm riscv: add a data fence for CMODX in the kernel mode 2025-07-06 11:01:35 +02:00
net riscv, bpf: Make BPF_CMPXCHG fully ordered 2024-10-17 17:14:48 +02:00
purgatory riscv/purgatory: 4B align purgatory_start 2025-04-10 14:39:33 +02:00
tools
Kbuild
Kconfig crash, powerpc: default to CRASH_DUMP=n on PPC_BOOK3S_32 2024-11-14 22:43:48 -08:00
Kconfig.debug
Kconfig.errata
Kconfig.socs
Kconfig.vendor
Makefile riscv: boot: add Image.xz support 2024-09-01 20:43:27 -07:00
Makefile.postlink