.a .so .bin 文件格式分析--文件格式是32位还是64位,数据是大端还是小端,运行在 arm 上还是 x86上

可通过readelf指令,分析文.a .so .bin 文件是在什么系统上编译的,文件格式是32位还是64位,数据是大端还是小端,运行在 arm 上还是 x86上

1:格式读取说明

通过 readelf -a libbrd.a 读取文件的格式内容

bash 复制代码
File: libbrd.a(brd_audio.o)
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:                              REL (Relocatable file)
  Machine:                           ARM
  Version:                           0x1
  Entry point address:               0x0
  Start of program headers:          0 (bytes into file)
  Start of section headers:          10924 (bytes into file)
  Flags:                             0x5000000, Version5 EABI
  Size of this header:               52 (bytes)
  Size of program headers:           0 (bytes)
  Number of program headers:         0
  Size of section headers:           40 (bytes)
  Number of section headers:         22
  Section header string table index: 21

2:关键内容说明

2.1 Class

ELF32:说明该文件格式是32位系统格式

2.2 Data

2's complement, little endian:说明数据格式位为小端

2.3 Machine

ARM:说明当前文件运行在 arm架构 的系统上

相关推荐
一抹晴空9 小时前
Keil MDK AC6 compiler编译报错,与AC5区别
c语言·arm开发·单片机
运维成长记11 小时前
关于“有x86镜像,没有Dockerfile” 怎么制作arm架构的镜像
arm开发·架构
熠速17 小时前
PolarBox高性能实时仿真系统
arm开发·fpga开发·嵌入式实时数据库·硬件在环半实物仿真
天下·第二2 天前
如何在【x86】服务器上打包构建【arm】镜像
服务器·arm开发·eureka
止观止2 天前
在 WSL2 上从零搭建 ARM 混合编程环境
汇编·arm开发·嵌入式开发·混合编程
陌上花开缓缓归以2 天前
nand flash bbt和bmt管理
arm开发
小熊officer3 天前
AMD架构与ARM架构
arm开发·架构
_kerneler3 天前
arm虚拟机实时性优化总结
arm开发
口袋里のInit3 天前
基础知识——ARM M核入栈出栈流程
开发语言·arm开发
2035去旅行4 天前
WIFI传输带宽
arm开发·嵌入式硬件