objdump command to disassemble raw MIPS binary
Nick Clifton
nickc@redhat.com
Tue Aug 7 16:46:00 GMT 2018
Hi Alex,
> It turns out the problem is that files I have are not ELF binaries.
> So, question is how to convert the binary data file into a valid ELF executable?
It sounds like you need to use the assembler's .incbin directive.
Something like this:
% cat foo.s
.text
.incbin "binary-file"
If you assemble this you should end up with an ELF object file with
the contents of "binary-file" in the .text section. If you need the
file to be an executable you can just run it through the linker afterwards.
Cheers
Nick
More information about the Binutils
mailing list