[PATCH] perf symbols: Skip dynamic symbols with invalid section indexes

Namhyung Kim namhyung at kernel.org
Mon Aug 3 10:33:23 PDT 2026


On Tue, 28 Jul 2026 11:35:53 +0800, Zhanpeng Zhang wrote:
> RISC-V post-link processing can remove relocation sections from the final
> vmlinux while some .dynsym entries retain stale section indexes. perf
> aborts the whole ELF symbol load when elf_getscn() rejects one of them,
> discarding otherwise valid .symtab symbols.
> 
> Skip only dynamic symbols whose normal section index is outside the final
> section table. Keep the existing error path for .symtab, reserved indexes,
> and other libelf failures.
> 
> [...]
Applied to perf-tools-next, thanks!

Best regards,
Namhyung





More information about the linux-riscv mailing list