Issue with BFD and foreign ELF files

Alexandro Sanchez Bach alexaltea123@gmail.com
Sat May 13 10:18:00 GMT 2017


Hello,

Not sure if this is the appropriate mailing list as this concerns libbfd.

After opening ARM/MIPS/PPC ELF files (see attachments) via open_bfd(...),
whenever I query bfd_get_arch_info(...) I get bfd_arch_unknown (0) in the
arch and mach fields. Only x86/amd64 works as expected.

libbfd is a dependency (-lbfd) for my project. I installed it via `apt-get
install libbfd-dev` on Ubuntu 16.04, and noticed that there are multiple
"flavors" of BFD at /usr/lib/x86_64-linux-gnu/libbfd-2.26* (*.so, *-arm.so,
*-mips.so, *-system.so, etc.). Is there any way to dynamically load a
version that works with any architecture?
I would be really happy if someone could point me in the right direction.

Thanks,
Alexandro




More information about the Binutils mailing list