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

Namhyung Kim <[email protected]> Mon, 03 Aug 2026 10:33:23 -0700
Newsgroups org.kernel.vger.linux-perf-users,org.infradead.lists.linux-riscv,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
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