我正在尝试运行ghidra套件中的二进制文件。(实际上,我正在运行ghidra本身,但它无法在内部运行二进制文件)。
[nix-shell:~]$ ./ghidra/Ghidra/Features/Decompiler/os/linux64/decompile
bash: ./ghidra/Ghidra/Features/Decompiler/os/linux64/decompile: No such file or directory我无论如何也找不出问题是什么:我读到库丢失会导致这种情况,而ldd报告libstdc++.so.6丢失了。在花了很大力气让libstdc++.so.6被拾取之后(nix似乎让事情变得很困难),我得到了同样的错误:
[nix-shell:~]$ ./ghidra/Ghidra/Features/Decompiler/os/linux64/decompile
bash: ./ghidra/Ghidra/Features/Decompiler/os/linux64/decompile: No such file or directory
[nix-shell:~]$ ldd ./ghidra/Ghidra/Features/Decompiler/os/linux64/decompile
linux-vdso.so.1 (0x00007fffd9293000)
libstdc++.so.6 => /nix/store/f09zmq3sqiy0dnx8g4f1arngkjd4kih7-gcc-7.4.0-lib/lib64/libstdc++.so.6 (0x00007f20ca795000)
libm.so.6 => /nix/store/h0p0h3rh1q4i2yavzm3yqi716s9yaj2f-glibc-2.27/lib/libm.so.6 (0x00007f20ca5ff000)
libgcc_s.so.1 => /nix/store/f09zmq3sqiy0dnx8g4f1arngkjd4kih7-gcc-7.4.0-lib/lib64/libgcc_s.so.1 (0x00007f20ca5e6000)
libc.so.6 => /nix/store/h0p0h3rh1q4i2yavzm3yqi716s9yaj2f-glibc-2.27/lib/libc.so.6 (0x00007f20ca430000)
/lib64/ld-linux-x86-64.so.2 => /nix/store/h0p0h3rh1q4i2yavzm3yqi716s9yaj2f-glibc-2.27/lib64/ld-linux-x86-64.so.2 (0x00007f20ca921000)还有没有人有更多的想法?更多信息:
[nix-shell:~]$ file ./ghidra/Ghidra/Features/Decompiler/os/linux64/decompile
./ghidra/Ghidra/Features/Decompiler/os/linux64/decompile: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=bd3c148954c7800224c513a9d91ce61e50cb1a03, not stripped发布于 2020-02-11 07:53:25
在文件命令输出中,interpreter /lib64/ld-linux-x86-64.so.2似乎是错误的。也许可以尝试这样做,以使可执行文件工作:
patchelf --set-interpreter $(patchelf --print-interpreter `which cp`) \
./ghidra/Ghidra/Features/Decompiler/os/linux64/decompilehttps://stackoverflow.com/questions/60132157
复制相似问题