- 论坛徽章:
- 0
|
我在嵌入式LINUX编译动态库,也就是共享对象的时候使用如下选项
arm-linux-gcc -shared -fPIC -o libtest.so test.c
用arm-linux-readelf 读取文件header
arm-linux-readelf -h libtest.so
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file) 这里不是(shared object)
Machine: ARCompact
Version: 0x1
Entry point address: 0x1028c
Start of program headers: 52 (bytes into file)
Start of section headers: 1580 (bytes into file)
Flags: 0x3, ARC700
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 5
Size of section headers: 40 (bytes)
Number of section headers: 20
Section header string table index: 17
请问是何原因? |
|