HomeFreeBSD

pmcstat: fix PPC kernel symbol resolution

Description

pmcstat: fix PPC kernel symbol resolution

PowerPC kernel is of DYN type and it has a base address where it is
initially loaded, before being relocated. As the start address passed to
pmcstat_image_link() is where the kernel was relocated to, but the symbols
always use the original base address, we need to subtract it to get the
correct offset.

Reviewed by: jhibbits
Sponsored by: Eldorado Research Institute (eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D26114

Details

Provenance
luporlAuthored on
Reviewer
jhibbits
Differential Revision
D26114: pmcstat: fix PPC kernel symbol resolution
Parents
rS367391: libpmc: add support for POWER8/9 PMCs
Branches
Unknown
Tags
Unknown