HomeFreeBSD

dtrace: fix symbol address resolution

Description

dtrace: fix symbol address resolution

Dtrace assumes only ELF sections of type SHT_PROGBITS or SHT_NOBITS
occupy memory space. However, sections with SHF_ALLOC flag also consume
memory space. Moreover, the symbol address initialization skips symbols
at the very beginning of a section in ET_REL KLDs.

Fix: Check section flag for calculating section offset, and disable the
skipping at the beginning of a section.

PR: 288000
Reviewed by: markj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D51188

Details

Provenance
zldrobit_gmail.comAuthored on Jul 7 2025, 6:51 PM
markjCommitted on Jul 7 2025, 8:16 PM
Reviewer
markj
Differential Revision
D51188: dtrace: fix symbol address resolving
Parents
rG3a20f630a9fc: git-arc: Fix handling of author names when we have to make a guess
Branches
Unknown
Tags
Unknown