Skip to main content

ARM Build

# EABI version
gcc -dumpmachine
readelf -h libsqlite3.so | grep Flags

echo 'int main(){}' > test.c
gcc -o test test.c
# 默认
file test

# 查看是否 VFP
readelf -A test | grep VFP

gcc -print-multi-lib

# 预设架构
gcc -Q --help=target

-mabi

ABI Variables

KernelABICLFS_ABI=ValueNote
CONFIG_AEABIaapcs-linuxaapcs-linuxEABI. Linux 32 bit (int) enums
-apcs-gnuapcs-gnuOABI
CONFIG_THUMB2_KERNELatpcsatpcsThumb ABI
-aapcsaapcsEABI w/ variable size enums
CONFIG_IWMMXTiwmmxtiwmmxtIntel XScale MMX

sorry, unimplemented: -mfloat-abi=hard and VFP

  • -mfloat-abi=soft
gcc -march=?

Source object /tmp/out.o has EABI version 0, but target test has EABI version 5

混合了 OABI 和 EABI

cannot find libgcc_s.so.1

  • -mabi=aapcs-linux
apk add libgcc