5——Linux二进制分析——学习——关于elf文件类型/-no-pie选项
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash

·
《4——Linux二进制分析——学习——ptrace调试器》的补充。关于编译test的问题。
我直接通过gcc test.c -o test编译,在执行的时候会报错./testshare is not an ELF executable. The type: 3.我用readelf -h test去查看头文件的时候发现test的文件格式是 DYN (Shared object file),而我想要的应该是 EXEC (Executable file)格式。百度后在一篇博客中发现了问题所在。是一个gcc叫做pie的功能导致,是为了系统安全。我们的交叉编译连自动关闭了pie,所以以前没有发现这种情况。使用gcc test.c -o test -no-pie编译即可。
那篇博客是https://blog.csdn.net/cclethe/article/details/83387685,谢谢兄弟的指点。里面有详细的说明,受益良多。




A beautiful web dashboard for Linux
最近提交(Master分支:5 天前 )
186a802e
added ecosystem file for PM2 5 年前
5def40a3
Add host customization support for the NodeJS version 5 年前
更多推荐
所有评论(0)