Closed hellow554 closed 4 months ago
Interesting. I wonder what difference the symbian/vxworks formats really are about - it should still be the same instruction set.
Anyway, I'll have to look a bit more into this. emilpro does not use objdump, but the binutils library directly - so I'll have to check how to specify the format from the API. I wonder if it would be possible to simply specify a "lowest common denominator", .e.g., elf32-littlearm in this case. I've disassembled ARM binaries before with emilpro without issues, so I think this might depend a bit on the toolchain.
And as for the GUI, I've been planning for a long time to replace the GTK gui with a Qt ditto, so I'd be a bit reluctant to add more features to the GTK port. The Qt GUI is "almost there", but not quite yet.
I have the same problem with getting the "Error: not matching fileformat..." for every file I wanna open. I tried some self compiled ARM and x86-64 binaries. One of these was the "file-to-source" binary created by the Makefile.
I cloned and build the project today. Any help?
Do you have libcapstone-dev installed? With capstone, binutils should not be used for either ARM nor x86-64.
Yes, I have libcapstone-dev installed.
Are you able to upload the file-to-source binary somewhere so that I can take a look at it?
here's a link to the file-to-source binary I tried. Basically the behaviour is similar with every other binary I tried to open.
https://drive.google.com/file/d/0BxRFBmc7gxpgR1AzQXBtbDVOVU0/view
Thanks! Although perhaps it's the other way around, i.e., being caused by libcapstone? You can try by editing src/capstone-disassembly.cc and return 0 from CapstoneDisassembmblerProvider::match() and building emilpro.
I did the patch in CapstoneDisassembmblerProvider::match() and called "make" again. Nothing changed.
Then I tried to rebuild everything and cloned the project again. Now make fails to build binutil-gdb:
fatal: Reference is no "Tree"-Object: 6711b7f8d5f5fa24d6e44ccbe76fce12bd162a37 CMakeFiles/binutils.dir/build.make:61: recipe for target '.binutils-downloaded' failed
Sorry, the binutils build stuff should now be fixed with f29254b213746a840b47e9afabf3a80f3b862e64.
Ok, thanks. Compiling works again!
But my problem stays. With the file-to-source binary I don't get any stdout but the emilpro does not show anything. With my other binaries the "file format" error still exists...
Good. I tried at another computer again with your file, but unfortunately it opens just fine so something is strange at either your or my setup. What system are you using? I've tested it under both Ubuntu 14.04 and Fedora 22.
I am using Ubuntu 14.10 64bit. Also I am writing my own application based on the capstone-lib (https://github.com/aquynh/capstone/tree/next). Maybe with building this and other stuff related to it some dependencies of emilpro are causing problems. I will set up a virtual machine and try it there!
Thanks a lot for our help! Its much appreciated!
I've the same issue for my BFD-backend to snowman... Did you guys fixed the QT-dialog?
The QT gui is usable, but still lacking part of the functionality in the GTK port. It can be built with
mkdir bld
cd bld
cmake ../src/qt/
make
doesn't build with QT4(?)
also you should use something like bfd_simple_get_relocated_section_contents in simple.c for doing the relocation of addresses.
I started with Qt4, but have since moved to Qt5 - probably it's not compatible with Qt4 anymore.
Thanks for the relocation hint, I'll look into it!
8 years later, the reimplemented version has basic support for selecting architecture, so closing this.
When I compile a file, using clang (or gcc) for arm
and then try to open it with emilpro, it will exit with the error
I spent some time to figure out why, and then solution came out of the sudden. Binutils knows way to many file formats and some of them are not very different. Why I try to open a.o with the (for emilpro) compiled binutils, it will spit out
The sollution is to provide objdump the format with the
-b
switch, e.g.this will work. My proposed solution would be:
console
-b
) where you can specify the format if it's not valid, objdump will print that out(/objdump -D /home/marcel/a.o -b x86
./objdump: /home/marcel/a.o: Invalid bfd target
)gui