]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
pmcstat: fix PPC kernel symbol resolution
authorLeandro Lupori <luporl@FreeBSD.org>
Thu, 5 Nov 2020 16:47:23 +0000 (16:47 +0000)
committerLeandro Lupori <luporl@FreeBSD.org>
Thu, 5 Nov 2020 16:47:23 +0000 (16:47 +0000)
commit926da0492a672c3175d81f24bfa1b4ad461b884b
treedea8ad759cec22b62f09aa4aa53ed05718a9777b
parent5cebdfc072f2c26a266e90534f1a4044f321a5ba
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