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

Kris Van Hees kris.van.hees at oracle.com
Fri Nov 6 21:29:06 UTC 2026


On Fri, Nov 06, 2026 at 01:16:24PM +0000, Nick Alcock wrote:
> On 6 Nov 2026, Nick Alcock said:
> 
> > 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â?Ts 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.)
> 
> ... oh wait, this is for uprobes. The symtab in use for that follows the
> above rules then (and libctf does the symtypetab lookup for you, if
> uprobes is using that. Don't implement it yourself simply because CTFv4
> redoes this completely while retaining almost the same user-visible API,
> and you don't want to change everything twice! v4 always uses the
> dynsymtab, unconditionally.)

But I do not have CTFv4 righr now, so we need this.



More information about the DTrace-devel mailing list