Crates.io | elf-info |
lib.rs | elf-info |
version | 0.3.0 |
source | src |
created_at | 2023-04-09 15:09:42.18579 |
updated_at | 2023-04-18 19:23:28.919307 |
description | Inspect and dissect an ELF file with pretty formatting. |
homepage | |
repository | https://github.com/kevin-lesenechal/elf-info |
max_upload_size | |
id | 834359 |
size | 1,282,876 |
elf-info
can inspect and display information about ELF binaries, the executable
format mostly used on Linux. This CLI tools aims at being ergonomic, without the
need of using two different commands (objdump
and readelf
) that have impossible
to remember options.
elf-info
commands and options are easy to remember yet short and easy to type.
Efforts are made on the presentation of the data, using colors and ASCII tables.
For better ergonomics, you can set a ELF
environment variable so not to have
to repeat the file name on each command.
The fn
subcommand is my favorite: give it a function’s name and its full
pretty-formatted disassembly is displayed.
By passing --cfi
you can superimpose call frame information (CFI):
You can quickly list all symbols, and demangle the names.
Pass --no-demangle
for not demangling.
Pass -l
/ -g
/ -w
/ -d
to only display local / global / weak / defined symbols.
Pass -t <TYPE>
to filter by symbol type.
Pass -D
to only display dynamic symbols.
Pass -f
to filter by symbol name using a regular expression.
For some type of sections, elf-info
is able to interpret its content and
display it in a more usable way. For example, for a table of strings, all strings
are listed. You can add the option -x
or --hexdump
to always display a hexdump.
In the same way, elf-info
can pretty print the content of .eh_frame_hdr
.
Quickly find EH information for a specific symbol with -s
: