{"id":23360,"library":"binsize","title":"binsize","description":"A tool to analyze the size of a binary from an ELF file. Currently at version 0.1.4, released irregularly as a hobby project. It parses ELF files and provides detailed size breakdowns by sections, symbols, and memory regions.","status":"active","version":"0.1.4","language":"python","source_language":"en","source_url":"https://github.com/grdddj/binsize","tags":["embedded","elf","binary-size","analysis"],"install":[{"cmd":"pip install binsize","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Used to parse ELF files","package":"pyelftools","optional":false}],"imports":[{"note":"The main entry point for analyzing an ELF file.","symbol":"analyze","correct":"from binsize import analyze"}],"quickstart":{"code":"from binsize import analyze\nimport tempfile, os\n\n# Example: analyze an ELF file (provide path to your .elf)\nresult = analyze('/path/to/your.elf')\nprint(result)","lang":"python","description":"Basic usage: import the analyze function and pass the path to an ELF file. Returns a dictionary with size information."},"warnings":[{"fix":"Ensure you have an ELF binary (e.g., from GCC or Rust compilation) before calling analyze.","message":"The `analyze` function expects an existing ELF file; it does not generate binaries.","severity":"gotcha","affected_versions":"<=0.1.4"},{"fix":"Inspect the result structure manually after upgrading.","message":"The output format is a nested dictionary that may change between minor versions; do not rely on exact keys without checking.","severity":"gotcha","affected_versions":"<=0.1.4"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install binsize` and verify the import: `from binsize import analyze`.","cause":"The module name is correct but the package may not be installed or the import path is case-sensitive.","error":"ImportError: cannot import name 'analyze' from 'binsize'"},{"fix":"Check the file path and ensure it is a valid ELF file (e.g., compiled with arm-none-eabi-gcc).","cause":"The path provided to analyze does not exist or is not an ELF file.","error":"FileNotFoundError: [Errno 2] No such file or directory: 'file.elf'"},{"fix":"Verify the ELF file with `readelf -S your.elf` or use a different binary.","cause":"The ELF file might be malformed or not contain expected sections.","error":"KeyError: 'sections'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}