Giter Club home page Giter Club logo

elfmem's Introduction

elfmem

Takes an ELF and a Linker Script as input and prints informations about the memory usage. Tested on ARM, ESP8266 (xtensa) and RISC-V ELF files

Installation guide

You can grab the binary file from the releases page, or the .deb package which is just a commodity installer for the binary file. If you have NodeJS installed and want to install globally with npm

git clone https://github.com/vankxr/elfmem
cd elfmem
npm i -g

Usage

# elfmem --help
Usage: elfmem [options] <elf-path>

Options:
  -l, --ldscript <path>     The linker script the application was linked against
  -d, --details             Print extra details
  -h, --humanify            Print human readable sizes
  -e, --exclude <sections>  Comma-separated list of sections to exclude
  -i, --include <sections>  Comma-separated list of sections to include
  -z, --exclude-empty       Exclude empty sections
  -h, --help                output usage information

Example output

# elfmem -l ./linker-script.ld -d -h ./target-elf-file.elf
Section 'irom0':
  Start address: 0x00000000
  End address: 0x007FFFFF
  Permissions: rx
  Total usage: 0.11% (9.30 KiB/8.00 MiB)
    Sub-section '.irom0.text': 0.11% (9.17 KiB)
    Sub-section '.riscv.attributes': 0% (47.00 B)
    Sub-section '.dram1.data': 0% (80.00 B)
Section 'iram0':
  Start address: 0x01000000
  End address: 0x0101DFFF
  Permissions: rwx
  Total usage: 0.31% (384.00 B/120.00 KiB)
    Sub-section '.iram0.text': 0.31% (384.00 B)
Section 'dram0':
  Start address: 0x0101E000
  End address: 0x0101FFFF
  Permissions: rw
  Total usage: 0% (0.00 B/8.00 KiB)
Section 'dram1':
  Start address: 0x20000000
  End address: 0x3FFFFFFF
  Permissions: rw
  Total usage: 0% (92.00 B/512.00 MiB)
    Sub-section '.dram1.data': 0% (80.00 B)
    Sub-section '.bss': 0% (12.00 B)

elfmem's People

Contributors

vankxr avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.