Talk:Dev Tools: Difference between revisions
Jump to navigation
Jump to search
m (Created page with "== netrpc == git://gist.github.com/1041214.git <br />https://gist.github.com/1041214") |
mNo edit summary |
||
Line 2: | Line 2: | ||
git://gist.github.com/1041214.git <br />https://gist.github.com/1041214 | git://gist.github.com/1041214.git <br />https://gist.github.com/1041214 | ||
---- | |||
If you, for whatever reason, need to disassemble non-x86 binary files, you usually look out for a disassembler. If there's nothing free available for your platform (e.g.: ARM) one of the few solutions may be buying something like IDA Pro. | |||
But wait, if you only need to "analyze" a small portion (boot-sector, single routine, ...) and someone already ported GNUs GCC and bintools to your platform, using OBJDUMP may do the trick... | |||
If "raw.bin" is your binary file, just typing | |||
<pre> objdump -d raw.bin | |||
objdump: raw.bin: File format not recognized</pre> | |||
will not work. Objdump needs a file system object or file. | |||
Just do it like this: | |||
<pre> # create an empty file | |||
touch empty.c | |||
# compile this empty file | |||
gcc -c -o empty.o empty.c | |||
# add binary as a raw section | |||
objcopy --add-section raw=raw.bin empty.o | |||
# remove ".comment" section to join | |||
objcopy -R .comment empty.o | |||
# now run objdump on it | |||
objdump -d empty.o</pre> | |||
Source: http://askrprojects.net/software/objdump.html | |||
---- |
Revision as of 23:09, 5 July 2011
netrpc
git://gist.github.com/1041214.git
https://gist.github.com/1041214
If you, for whatever reason, need to disassemble non-x86 binary files, you usually look out for a disassembler. If there's nothing free available for your platform (e.g.: ARM) one of the few solutions may be buying something like IDA Pro.
But wait, if you only need to "analyze" a small portion (boot-sector, single routine, ...) and someone already ported GNUs GCC and bintools to your platform, using OBJDUMP may do the trick...
If "raw.bin" is your binary file, just typing
objdump -d raw.bin objdump: raw.bin: File format not recognized
will not work. Objdump needs a file system object or file.
Just do it like this:
# create an empty file touch empty.c # compile this empty file gcc -c -o empty.o empty.c # add binary as a raw section objcopy --add-section raw=raw.bin empty.o # remove ".comment" section to join objcopy -R .comment empty.o # now run objdump on it objdump -d empty.o
Source: http://askrprojects.net/software/objdump.html