Decompiler Design - Decompiler Architecture |
|
Prev: Problems with the Simple Decompiler
Most decompilers are organized as a number of modules that extract various kinds of information from the binary file. This modularization follows the typical organization of compilers. Its main purpose is to make it easy to port the decompiler to a different processor or to test new algorithms without having to rewrite the entire code every time.
The following picture illustrates the various modules and their relationship:
At first sight one could assume that the input file is processed sequentially by each module until the transformed data reaches the output module. We'll see in the advanced section that it is not possible to perform advanced decompilation in a single pass over the input program. The use of multiple passes may make some analysis more complicated, but it will give much better results.
Next: Object File Formats