[PATCH] libelf: Rewrite elf_scnshndx, extended index table handling

Aaron Merey amerey@redhat.com
Sat Mar 1 00:25:58 GMT 2025


Hi Mark,

On Sun, Feb 23, 2025 at 6:31 PM Mark Wielaard <mark@klomp.org> wrote:
>
> elf_scnshndx is a elfutils extension to libelf that given a SHT_SYMTAB
> section returns the index to the corresponding SHT_SYMTAB_SHNDX
> section, if it exists. This is needed when there are more than 64K
> sections and there are symbols that have to refer to a section with an
> index larger than 64K, because the Elf Sym st_shndx field is only
> 16 bits.

LGTM. The new tests do a nice job of proving that libelf will properly
handle binaries with >64K sections.

Aaron



More information about the Elfutils-devel mailing list