Is there any way to determine whether a linux executable is using soft float on an ARM processor?

StackOverflow https://stackoverflow.com/questions/2211956

  •  18-09-2019
  •  | 
  •  

Question

Is there any way to determine whether a linux executable is using soft float on an ARM processor?

Thanks, Ben

Was it helpful?

Solution

Depending on the ARM ABI (EABI) version, there is a processor-specific flags for ARM that indicate the floating point behavior in the e_flags field of an ELF header.

From Linux/arch/arm/include/asm/elf.h

#define EF_ARM_SOFT_FLOAT       0x00000200      /* ABI 0 */

EF_ARM_SOFT_FLOAT - use FP instructions(0) libcalls (1)

There are programs such as readelf that can be used to display information about ELF files.

OTHER TIPS

is there something in /sys or /proc that tells you what processor it is, you could possibly determine from the processor family/type if it has a floating point unit.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top