gpt4 book ai didi

elf - 在 elf 二进制文件中查找所有函数定义的方法

转载 作者:行者123 更新时间:2023-12-01 11:29:34 30 4
gpt4 key购买 nike

假设我有一个 lib xxx.so。所以我得到了所有的函数名和参数
以下命令:

readelf -Ws xxx.so  |c++filt 

它将输出以下内容:
  711: 00270209    40 FUNC    GLOBAL DEFAULT    8 debug_c_tree
7712: 00270231 128 FUNC GLOBAL DEFAULT 8 pp_c_tree_decl_identifier
7713: 00270723 90 FUNC GLOBAL DEFAULT 8 pp_c_init_declarator
7714: 002f546c 0 NOTYPE GLOBAL DEFAULT ABS _edata
7715: 002f546c 0 NOTYPE GLOBAL DEFAULT ABS __bss_start
7716: 002fc9e1 0 NOTYPE GLOBAL DEFAULT ABS _end

但是如何轻松地将所有函数体转储到 elf 二进制文件中,如下所示:
debug_c_tree() 
{
mov eax, edx;
....
....
}

....

最佳答案

how can I easily dump all function body


objdump -d xxx.so

关于elf - 在 elf 二进制文件中查找所有函数定义的方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33908420/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com