I don't have access to the build command, I just have the library in my system.
I guess I could build an hardfp executable that links against it and test, but I'm wondering if there's an easier way.
I don't have access to the build command, I just have the library in my system.
I guess I could build an hardfp executable that links against it and test, but I'm wondering if there's an easier way.
Use
readelf
.Here's some example output from one an ARM build of Poco:
In the flags section, it will list data about the elf file. These are defined in the ARM ELF Specification, check table 4-2. In my case, this was built with a hard float compiler, so hard-float is listed as a flag.
On a soft float library, the flags line looks like this:
Execute
readelf -A library.so
: if the list of printed tags containsTag_ABI_VFP_args: VFP registers
, then it is ahardfp
binary, otherwise assumesoftfp
.E.g.
readelf -A /lib/arm-linux-gnueabihf/libm.so.6
will produceOn the other side,
readelf -A /lib/arm-linux-gnueabi/libm.so.6
producesUse
objdump -d
to disassemble, then grep for some floating point commands. I'm not sure whether objdump will produce UAL-compliant assembly, so try old syntax too. It might be even easier to watch for register names rather than command mnemonics, but there could be false positives.