查看so文件是32位还是64位

  1. $ file libssl.so.2
  2. libssl.so.2: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[md5/uuid]=cd3a7b5a71bec96c13b9d707836eba0d, not stripped

显示依赖的其他库文件

  1. $ readelf -d libssl.so.2 | grep NEEDED
  2. 0x00000001 (NEEDED) Shared library: [libcrypto.so.2]
  3. 0x00000001 (NEEDED) Shared library: [libc.so.4]

显示arch信息

  1. $ readelf -A libssl.so.2
  2. Attribute Section: aeabi
  3. File Attributes
  4. Tag_CPU_name: "7-A"
  5. Tag_CPU_arch: v7
  6. Tag_CPU_arch_profile: Application
  7. Tag_ARM_ISA_use: Yes
  8. Tag_THUMB_ISA_use: Thumb-2
  9. Tag_FP_arch: VFPv3
  10. Tag_ABI_PCS_wchar_t: 4
  11. Tag_ABI_FP_denormal: Needed
  12. Tag_ABI_FP_exceptions: Needed
  13. Tag_ABI_FP_number_model: IEEE 754
  14. Tag_ABI_align_needed: 8-byte
  15. Tag_ABI_enum_size: int
  16. Tag_ABI_VFP_args: VFP registers
  17. Tag_CPU_unaligned_access: v6

查看 .so 导出函数列表

  1. $ objdump -tT libssl.so.2
  2. or
  3. $ nm -D libssl.so.2