Compilation strategy

Walter Bright newshound2 at digitalmars.com
Mon Dec 17 01:58:19 PST 2012


On 12/17/2012 1:35 AM, Paulo Pinto wrote:
> It suffices to get the general algorithm behind the code, and that is impossible
> to hide, unless the developer resorts to cryptography.

I'll say again, with enough effort, an expert *can* decompile object files by 
hand. You can't make a tool to do that for you, though.

It can also be pretty damned challenging to figure out the algorithm used in a 
bit of non-trivial assembler after it's gone through a modern compiler optimizer.

I know nobody here wants to believe me, but it is trivial to automatically turn 
Java bytecode back into source code.

Google "convert .class file to .java":

     http://java.decompiler.free.fr/

Now try:

Google "convert object file to C"

If you don't believe me, a guy who's been working on C compilers for 30 years, 
and who also wrote a Java compiler, that should be a helpful data point.


More information about the Digitalmars-d mailing list