This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: objdump command to disassemble raw MIPS binary


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]