free disassembly tool - Little Smarter Disassembler - General Discussion and Assistance - CHDK Forum  

free disassembly tool - Little Smarter Disassembler

  • 1 Replies
  • 2671 Views
free disassembly tool - Little Smarter Disassembler
« on: 23 / December / 2013, 02:19:16 »
Advertisements
Here is a little X-mas present for those who want to do reverse engineering of ARM Thumb code with free (as in freedom) tools. I am publishing it here since the CHDK wiki was the only place I found information about disassembling ARM with the GNU toolchain when I was looking for this a while ago. chr and fudgey had written disassemble.pl to make objdump more useful and provided me with the motivation to take it one step further. (BTW I added Thumb support to disassemble.pl, see https://gitorious.org/lsd/disassembler)

So a few days ago I wrote a new tool from scratch, traverse.pl, which similarly to disassemble.pl uses objdump for the disassembly itself, but also tries to automate the task of following code paths and separating code from inlined data. It collects function calls to generate a call graph. The user can add labels to known addresses, which will appear in the code listing and call graphs.

This is more proof of concept than a real application, but it works well enough to be useful for me. It is currently only tested with Thumb code (for Cortex-M3) and will probably need patching to work on other architectures. Patches and comments are very welcome.

The tool can be found at https://gitorious.org/lsd/discovery

Best regards,
Tormod

*

Offline c10ud

  • ***
  • 245
Re: free disassembly tool - Little Smarter Disassembler
« Reply #1 on: 11 / March / 2014, 06:46:28 »
Here is a little X-mas present for those who want to do reverse engineering of ARM Thumb code with free (as in freedom) tools. I am publishing it here since the CHDK wiki was the only place I found information about disassembling ARM with the GNU toolchain when I was looking for this a while ago. chr and fudgey had written disassemble.pl to make objdump more useful and provided me with the motivation to take it one step further. (BTW I added Thumb support to disassemble.pl, see https://gitorious.org/lsd/disassembler)

So a few days ago I wrote a new tool from scratch, traverse.pl, which similarly to disassemble.pl uses objdump for the disassembly itself, but also tries to automate the task of following code paths and separating code from inlined data. It collects function calls to generate a call graph. The user can add labels to known addresses, which will appear in the code listing and call graphs.

This is more proof of concept than a real application, but it works well enough to be useful for me. It is currently only tested with Thumb code (for Cortex-M3) and will probably need patching to work on other architectures. Patches and comments are very welcome.

The tool can be found at https://gitorious.org/lsd/discovery

Best regards,
Tormod
Tormod,
thanks for your useful tools!

For those interested I'm using it along with the gcc-arm-none-eabi from https://launchpad.net/~terry.guo/+archive/gcc-arm-embedded in order to see what's wrong with this s120 firmware dump :)

however I have a small issue with the traverse.pl tool (maybe I'm trying to use it in the wrong way), I'm using a 16M dump and the labels from disassembler.pl, this is the error:

Out of memory during array extend at ./traverse.pl line 70.

 

Related Topics