Hi!

I'm trying to use disassemble.py from the htdocs/cgi-bin directory to
disassemble an ELF file which I've recreated from the binary format.
Apparently disassemble.py chokes on this file, while "msp430-objdump -D"
can read and disassemble it:

# python disassemble.py -b somefile.elf
---- file: somefile.elf ----
Traceback (most recent call last):
  File "disassemble.py", line 471, in <module>
    data.loadFile(options.binary)
  File "/usr/lib/python2.5/site-packages/mspgcc/memory.py", line 137, in
loadFile
    self.loadELF(fileobj)
  File "/usr/lib/python2.5/site-packages/mspgcc/memory.py", line 111, in
loadELF
    raise Exception("No executable")
Exception: No executable

I've traced this down to the fact that the type header of my elf file is of
the wrong type:

# msp430-readelf -h somefile.elf
ELF Header:
  [...]
  Type:                              REL (Relocatable file)

Does anybody know a command line tool to modify elf headers? Apparently
"msp430-objcopy -O elf32-msp430" which was used to create the elf file
can't do it.

Or do I just need to add a "--force" option to disassemble.py?

-- 
MfG / Regards
Friedrich Lobenstock

Reply via email to