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

From: Namhyung Kim

Date: Mon Aug 03 2026 - 13:46:44 EST


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