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

来源:互联网 发布:淘宝吉他店铺推荐 编辑:程序博客网 时间:2024/06/06 09:49

工具: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位。


0 0
原创粉丝点击