[DTrace-devel] [PATCH 15/20] libdtrace: search both ELF symbol tables for module symbols

Kris Van Hees kris.van.hees at oracle.com
Sat Nov 7 16:04:38 UTC 2026


On Fri, Nov 06, 2026 at 01:13:40PM +0000, Nick Alcock wrote:
> On 30 Oct 2026, Kris Van Hees said:
> 
> > Keep independent symbol and address indices for SHT_SYMTAB and SHT_DYNSYM,
> > loading strings through each table’s sh_link. Search .symtab before .dynsym
> > and include dynamic-only names in module symbol iteration.
> 
> Yet noather place where one or the other strtab was overlooked. These
> mistakes all date right back to Solaris...
> 
> > Preserve .symtab indices for CTF, place dynamic and external symbols in
> > separate ID ranges, and use .dynsym for CTF when .symtab is absent. Allow
> 
> Except in old dicts (CTFv2, or v3 in the absence of the CTF_F_DYNSTR
> dict flag), .dynsym should be searched unconditionally for CTF.
> Preferring the symtab is wrong. (I suspect this code is basically never
> run, since it's all symtypetab stuff, and the symtypetab isn't emitted
> for kernel CTF.)

So are you saying that this should be updated (and some other existing
code) to give preference to .dynsym for lookups, and fallback to .symtab
if the symbol is not found in .dynsym?



More information about the DTrace-devel mailing list