Open prattmic opened 3 years ago
See also #17883.
Change https://go.dev/cl/416976 mentions this issue: cmd/pprof: fix addr calculation for Windows
Change https://go.dev/cl/227483 mentions this issue: cmd/internal/objfile: read file/line information for ELF PIE binaries
go tool pprof
does not support disassembly of position independent code (PIE binaries or shared libraries). Notably, on Windows PIE is default, so disassembly doesn't work by default:Without PIE:
Upstream pprof's binutils backend supports base address computation to handle position independent code, but our implementation skips that entirely.
The "binutils" implementation doesn't actually seem particularly specific to binutils, so it would likely not be too difficult to support in our implementation.
cc @cherrymui @mknyszek