Skip to main content

Detect software floating point usage in arm binaries

Project description

Code style: black Travis (.com) branch PyPI version PyPI pyversions

🔍 arm-float-detector

Utility to detect soft float/double math library inclusion in arm binaries (objects/archives/elfs).

# install
$ pip install arm-float-detector

# run
$ arm-float-detector --double a.out && echo OK
No soft double libs found!
OK

Requirements

Besides python, needs the nm utility. If you're on *nix, you probably have it.

What is this

Some processors do not have single- and/or double-precision floating point hardware, but instead rely on float math software libraries, which are relatively slow and add take up additional space in the application.

Unfortunately I can't find options for gcc/ld to detect and prohibit (eg warnings/errors/configuration options) using these functions; I believe the definitions are in the compiler somehow (TODO actually research this).

This utility enables detecting usage of this soft floating point libraries in binaries, suitable for being integrated into a CI check to prevent them.

Features

  1. detect presence of single- or double-precision soft floating point libraries
  2. TODO whitelist objects allowed to reference these libs (eg vsprintf)
  3. TODO enable printing objects containing the references for simpler elimination

NOTE only tested on linux, where grep supports -E 'string|string'. You use a mac, good for you, no idea if this will work there. Dependency on grep will probably be removed in the future.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arm-float-detector-0.3.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

arm_float_detector-0.3.0-py2.py3-none-any.whl (4.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file arm-float-detector-0.3.0.tar.gz.

File metadata

  • Download URL: arm-float-detector-0.3.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for arm-float-detector-0.3.0.tar.gz
Algorithm Hash digest
SHA256 1cbf74c71900152acf5c9d75a6c80e03a580abd197e1781b3565fe18983f94d9
MD5 257651e5f7c90a5d77d17bca3fe354c1
BLAKE2b-256 602d5b593659fe0af628c5d0b43a36832ae6d17e0d320255884e3305b35f748c

See more details on using hashes here.

File details

Details for the file arm_float_detector-0.3.0-py2.py3-none-any.whl.

File metadata

  • Download URL: arm_float_detector-0.3.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for arm_float_detector-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 03d44f36bdefc92ebfa41e123280ac98dae8a0cbef73fd3810639a385056f7ec
MD5 4af125a8365b571291106c1d29627e01
BLAKE2b-256 79b5905179ec2506374395225b219b0a85cfeb5d0e78a39c82ccf58fad50d75d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page