如何在GDB中反汇编.rel.dyn段中的指定共享库函数?
问题:如何在GDB中反汇编
.rel.dyn段中的指定函数? 我有一个名为_ZN12proxy_server3run28run_impl_only_for_decryption2RS17h0667553f3e6e2968E(已还原名称)的函数,定义在共享库libtiflash_proxy.so中,被二进制程序tiflash调用。
通过objdump -d tiflash-dir/libtiflash_proxy.so | grep ...命令可以找到该函数的汇编代码:
15c1088: 48 8d 05 39 6e 25 02 lea 0x2256e39(%rip),%rax # 3817ec8 <_ZN12proxy_server3run28run_impl_only_for_decryption2RS17h0667553f3e6e2968E> 15c108f: 48 89 45 80 mov %rax,-0x80(%rbp)
但启动gdb tiflash后,尝试通过函数名反汇编时,GDB返回错误:
(gdb) disass _ZN12proxy_server3run28run_impl_only_for_decryption2RS17h0667553f3e6e2968E No symbol "_ZN12proxy_server3run28run_impl_only_for_decryption2RS17h0667553f3e6e2968E" in current context.
已知该函数位于.rel.dyn段,推测这是无法通过名称直接反汇编的原因。相关nm和readelf命令的输出如下:
# nm tiflash-dir/libtiflash_proxy.so | grep "_ZN12proxy_server3run28run_impl_only_for_decryption2RS17h0667553f3e6e2968E" 0000000003817ec8 d _ZN12proxy_server3run28run_impl_only_for_decryption2RS17h0667553f3e6e2968E # readelf -r tiflash-dir/libtiflash_proxy.so | grep "3817ec8" 000003817ec8 000000000008 R_X86_64_RELATIVE 3817ee8
请问是否有方法能在GDB中反汇编该指定函数?
内容的提问来源于stack exchange,提问作者calvin
相关产品推荐
相关产品推荐

