HomeFreeBSD

linker: Improve handling of ifuncs when fetching symbol metadata

Description

linker: Improve handling of ifuncs when fetching symbol metadata

When looking up symbol values, we map ifunc symbols to the value
returned by the resolver. However, the returned symbol size is still
that of the resolver. Be consistent and provide the size of the
implementation symbol as well.

This fixes an inconsistency in dtrace's FBT provider, which enumerates
all function symbols and disassembles their values, using the symbol
size as the bound for the disassembly loop. In particular, for ifuncs,
we were not creating return probes.

Reviewed by: kib
MFC after: 2 weeks
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D50683

Details

Provenance
markjAuthored on Jul 2 2025, 1:34 PM
Reviewer
kib
Differential Revision
D50683: linker: Improve handling of ifuncs when fetching symbol metadata
Parents
rGc9fcffff6c59: cp: Fix typo in test case.
Branches
Unknown
Tags
Unknown