代码
#include <stdio.h>
int main(void) {
printf("hello world\n");
return 0;
}
编译
# gcc -c test.c
# gcc test.c
ELF文件头
# readelf -h test.o
# readelf -h a.out
目标文件没有有效的程序头:程序头的起点为0、程序头表的大小为0Byte、程序头表项的数量为0。只有节头表是有效的。
ELF文件魔数magic的格式
代码
#include <stdio.h>
int main(void) {
printf("hello world\n");
return 0;
}
编译
# gcc -c test.c
# gcc test.c
ELF文件头
# readelf -h test.o
# readelf -h a.out
目标文件没有有效的程序头:程序头的起点为0、程序头表的大小为0Byte、程序头表项的数量为0。只有节头表是有效的。
ELF文件魔数magic的格式