您的位置:首页 > 其它

读取so文件信息工具——readelf

2015-06-04 17:28 246 查看
工具:readelf

常用参数:

-a 显示elf格式的信息

-h 显示elf头信息

举例:

#readelf -a libart.so

#readelf -h libart.so

[root@localhost vwang]# readelf -h libart.so

ELF Header:

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: DYN (Shared object file)

Machine: ARM

Version: 0x1

Entry point address: 0x0

Start of program headers: 52 (bytes into file)

Start of section headers: 5670572 (bytes into file)

Flags: 0x5000000, Version5 EABI

Size of this header: 52 (bytes)

Size of program headers: 32 (bytes)

Number of program headers: 10

Size of section headers: 40 (bytes)

Number of section headers: 31

Section header string table index: 28

判断so位数:Magic项中第五个字节,01为32位,02为64位。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: