If I load a library in to gdb and do info symbol 0xB0153C
I get something like function + offset
Is there a way to get this same information without gdb? Like some readelf/objdump option?
Thanks
If I load a library in to gdb and do info symbol 0xB0153C
I get something like function + offset
Is there a way to get this same information without gdb? Like some readelf/objdump option?
Thanks
Is there a way to get this same information without gdb?
I don't know of any tool that will print function+offset.
Use addr2line
to get the enclosing function name:
(gdb) info sym 0x108a
main + 10 in section .text
addr2line -fe a.out 0x108a
main
??:?
Or use objdump -d
with scripting to compute the offset (here 0x108a - 0x1080
):
objdump -d a.out | egrep '>:| 108a:' | grep -B1 '108a:'
0000000000001080 <main>:
108a: 48 83 ec 38 sub $0x38,%rsp