]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
pmcstat: fix PPC kernel symbol resolution
authorluporl <luporl@FreeBSD.org>
Thu, 5 Nov 2020 16:47:23 +0000 (16:47 +0000)
committerluporl <luporl@FreeBSD.org>
Thu, 5 Nov 2020 16:47:23 +0000 (16:47 +0000)
commitd591a8532fd524f10bbcd55a544f83cf3a2711b0
treedea8ad759cec22b62f09aa4aa53ed05718a9777b
parent022f00faaa2c3a8b825297dba8501759a336b116
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
lib/libpmcstat/libpmcstat_image.c