.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架构 的系统上

相关推荐
XINVRY-FPGA20 小时前
XCZU4EV-1FBVB900E Xilinx FPGA AMD Zynq UltraScale+ MPSoC EV(Embedded Vision)
arm开发·嵌入式硬件·计算机视觉·fpga开发·硬件架构·硬件工程·fpga
学不动CV了20 小时前
单片机ADC采集机理层面详细分析(二)
c语言·arm开发·stm32·单片机·嵌入式硬件·开源·51单片机
学不动CV了20 小时前
51核和ARM核单片机OTA实战解析(二)
c语言·arm开发·stm32·单片机·嵌入式硬件·51单片机
嵌入式小白牙1 天前
ARM-I2C硬实现
arm开发·单片机·嵌入式硬件
老猿讲编程1 天前
提升ARM Cortex-M系统性能的关键技术:TCM技术解析与实战指南
arm开发·arm·c
嵌入式小白牙2 天前
ARM-DMA
arm开发·stm32·单片机
亿道电子Emdoor3 天前
【ARM】ARM架构基础知识
arm开发·架构·arm
凉、介4 天前
ARM 学习笔记(四)
c语言·arm开发·笔记·学习·嵌入式
凉、介5 天前
ARM 学习笔记(三)
arm开发·笔记·学习·嵌入式
亿道电子Emdoor5 天前
【ARM】当选择AC5时每次点击build都会全编译
arm开发·arm