Skip to content

Instantly share code, notes, and snippets.

@lwerdna
lwerdna / loctool.c
Last active February 27, 2019 01:32
libopcodes command-line invocation
/*
## loctool: (libopcode tool) programmatically call the same disassembler objdump uses
* depends: libiberty, libbfd, libopcodes all from binutils
## setup
* get [binutils 2.30](https://ftp.gnu.org/gnu/binutils/binutils-2.30.tar.gz) and decompress.
* enter the libiberty directory, `./configure && make` then `cp libiberty.a /usr/local/lib`
* enter the bfd directory, edit configure and set all_targets=true then `./configure && make && make install`
* enter the opcodes directory, edit configure and set all_targets=true then `./configure && make && make install`