I've always used the fact that the symbol table and string table are present in the binary in that order and adjacent to each other to find the number of symbol table entries., ie (strtab - (char *)symtab) / sizeof(*symtab), although clearly this is not required and may just be gnu ld convention. DT_SYMSZ would be a useful addition to the ELF standard IMO.
Re: runtime validation of DT_SYMTAB lookups - why is there no DT_SYMSZ?
Jacob Burkholder via Elfutils-devel Sat, 27 Aug 2022 23:41:23 -0700
- runtime validation of DT_SYMTAB lookup... Milian Wolff
- Re: runtime validation of DT_SYMT... Mark Wielaard
- Re: runtime validation of DT_... Milian Wolff
- Re: runtime validation of... Mark Wielaard
- Re: runtime validatio... Jacob Burkholder via Elfutils-devel