假设我编译了下面的应用程序并删除了它的符号.
#include <stdio.h>
int main()
{
printf("Hello\n");
}
Run Code Online (Sandbox Code Playgroud)
构建过程:
gcc -o hello hello.c
strip --strip-unneeded hello
Run Code Online (Sandbox Code Playgroud)
如果应用程序没有被剥离,则拆卸主要功能将很容易.但是,我不知道如何反汇编应用程序的主要功能.
(gdb) disas main
No symbol table is loaded. Use the "file" command.
(gdb) info line main
Function "main" not defined.
Run Code Online (Sandbox Code Playgroud)
我怎么能这样做?它甚至可能吗?
注意:这必须仅使用GDB.忘掉objdump.假设我无权访问代码.
我们将非常感谢一步一步的例子.