Disassemble raw binary files with m68k crosscompilers

GFA, ASM, STOS, ...

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

Post Reply
simonsunnyboy
Moderator
Moderator
Posts: 5309
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Disassemble raw binary files with m68k crosscompilers

Post by simonsunnyboy »

I tried to disassemble a raw binary file with the cross GNU toolchain on my Linux box but I don't get any source output.

Code: Select all

$ m68k-atari-mint-objdump -b binary -m m68k -s nop.bin

nop.bin:     file format binary

Contents of section .data:
 0000 4e714e75                             NqNu   
-m m68k was necessary as binary alone wasn't sufficient, probably because the toolchain can also compile for Coldfire and others.

What sort of options are necessary to treat the file as a .text segment instead?

Und für die "Neunmalklugen", ja nop, rts;
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee
User avatar
mfro
Atari Super Hero
Atari Super Hero
Posts: 912
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: Disassemble raw binary files with m68k crosscompilers

Post by mfro »

For objdump to show a disassembly, you need to add the -d option.
For binary format, you need to add -D (as -d only disassembles the part it recognized as text segment).
simonsunnyboy
Moderator
Moderator
Posts: 5309
Joined: Wed Oct 23, 2002 4:36 pm
Location: Friedrichshafen, Germany
Contact:

Re: Disassemble raw binary files with m68k crosscompilers

Post by simonsunnyboy »

Thank you, that worked now as expected.

Code: Select all

$ m68k-atari-mint-objdump -b binary -m m68k -d -D -s nop.bin

nop.bin:     file format binary

Contents of section .data:
 0000 4e714e75                             NqNu            

Disassembly of section .data:

00000000 <.data>:
   0:	4e71           	nop
   2:	4e75           	rts
Simon Sunnyboy/Paradize - http://paradize.atari.org/

Stay cool, stay Atari!

1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee
Post Reply

Return to “Coding”