usage: elf-mem-analyze.py [-h] [-RO] [-RW] [-P] [-S NUMBER [NUMBER ...]] [-U]
                          [-l LINK_SCRIPT] [-t PATH] [-v] [-w MAX_WIDTH]
                          [-m MIN_SIZE] [-f] [-s] [-H] [-o] [-a]
                          [--no-demangle] [--no-merge-paths] [--no-color]
                          [--no-cumulative-size] [--no-totals]
                          ELF_FILE

Prints report of memory usage of the given executable. Shows how different
source files contribute to the total size. Uses inforamtion contained in ELF
executable and binutils programs. For best results the program should be
compiled with maximum debugging information (e.g. GCC flag: `-g`, or more:
`-ggdb3`).

positional arguments:
  ELF_FILE              path to the examined ELF file

optional arguments:
  -h, --help            show this help message and exit

Memory type:
  Specifies memory types for which statistics should be printed. Choosing at
  least one of these options is required. RAM/ROM options may be
  oversimplifed for some targets, under the hood they just filter the
  symbols by sections in the following manner: sections must have ALLOC flag
  and: for RAM - have WRITE flag, for ROM - not have NOBITS type.

  -RO, --ro_section     print RAM statistics
  -RW, --rw_section     print ROM statistics ("Flash")
  -P, --print-sections  print section headers that can be used for filtering
                        symbols with -S option (output is almost identical to
                        `readelf -WS ELF_FILE`)
  -S NUMBER [NUMBER ...], --use-sections NUMBER [NUMBER ...]
                        manually select sections from which symbols will be
                        used (by number)
  -U, --print-memory-usage
                        print memory usage

Basic arguments:
  -l LINK_SCRIPT, --link-script LINK_SCRIPT
                        link script file, this option need used with -U option
  -t PATH, --toolchain-triplet PATH, --toolchain-path PATH
                        toolchain triplet/path to prepend to binutils program
                        names, this is important for examining cross-compiled
                        ELF files, e.g `arm-none-eabi-` or `/my/path/arm-none-
                        eabi-` or `/my/path/`
  -v, --verbose         increase verbosity, can be specified up to 3 times
                        (versobity levels: ERROR -> WARNING -> INFO -> DEBUG)

Printing options:
  Options for changing the output formatting.

  -w MAX_WIDTH, --max-width MAX_WIDTH
                        set maximum output width, 0 for unlimited width
                        (default 80)
  -m MIN_SIZE, --min-size MIN_SIZE
                        do not print symbols with size below this value
  -f, --fish-paths      when merging paths, use fish-like method to shrink
                        them
  -s, --sort-by-name    sort symbols by name instead of sorting by size
  -H, --human-readable  print sizes in human readable format
  -o, --files-only      print only files (to be used with cumulative size
                        enabled)
  -a, --alternating-colors
                        use alternating colors when printing symbols
  --no-demangle         disable demangling of C++ symbol names
  --no-merge-paths      disable merging paths in the table
  --no-color            disable colored output
  --no-cumulative-size  disable printing of cumulative sizes for paths
  --no-totals           disable printing the total symbols size
