PDA

View Full Version : ELF to C


dave
April 28th, 2006, 05:52 PM
I was wondering if there were any tools that allowed someone to take a compiled file, and convert it back to the language it was writen in.

I know it wont be perfect because GCC does all sorts of crazy optimizations that ruin exactly what I wrote, but something that would still give me the structure (idea) of the binary?

--
dave

asimon
April 28th, 2006, 07:29 PM
You look for a decompiler like REC (http://www.backerstreet.com/rec/rec.htm) or Boomerang (http://boomerang.sourceforge.net/). There you can also find some example and information to see what you can expect from such tools.

rplantz
April 28th, 2006, 11:55 PM
If you read assembly language, you can use objdump with the -d option to disassemble an object file. Then you will see how the compiler optimized the code.