Pass all parameters via a specification structure, instead of direct arguments so that it is easier to extend and fill. Same way it was done for allocation utilities with allocation_spec.
Make error reporting more verbose by introducing the ability to provide extra numeric arguments for each error. This is accomplished via the elf_error structure used by all errorable functions.
Replace awkward elf_bitness with elf_arch and make the getter return an elf_error.
Add an elf_pretty_print_error helper that can be reused by callers to print the error & all of the available arguments with an optional prefix.