Thank you all. I was looking at the same goal, having collected stack
traces from eBPF helper with IPs.
With debug/elf I've been able to resolve symbols for the use cases I
tested, thank you Ian.
In example the right symbol is the one that satisfy ip >= sym.Value && ip
< (sym.Value+sym.Size) (
Thank you Ian!
Not sure yet if I found something useful related to the real process
addresses/offsets, but at least the "bcc" sources have one
"bcc_elf_get_text_scn_info()" that returns the address and offset of the
".text" section.
On Tuesday, April 2, 2024 at 8:01:11 PM UTC+2 Ian Lance Taylo
On Tue, Apr 2, 2024 at 2:35 AM 'TheDiveO' via golang-nuts
wrote:
>
> On Linux, given an arbitrary binary executable with symbol information in the
> executable, how can I lookup an instruction pointer address to get the
> corresponding symbol name?
>
> The binary (and its process) isn't a Go bin
On Linux, given an arbitrary binary executable with symbol information in
the executable, how can I lookup an instruction pointer address to get the
corresponding symbol name?
The binary (and its process) isn't a Go binary, but any arbitrary
executable. The stack unwinding has already been done