Extension of GCC with a fully manageable reverse engineering front end
暂无分享,去创建一个
In the open source community one of the most popular compilers is GNU GCC. It is a very complex and robust compiler, but because of its working mechanism it has no ability for special transformations like interprocedural optimizations. A typical compiler has a three sided construction. It has a front end for analyzes and for building an abstract internal representation of the program, a middle for transformations (e.g. optimizations), and a back end for final code generation. However there are smaller but very useful projects for only front/middle/back ends too, it seems possible to achieve a more effective compiler by extending GCC with a front end which is capable of running special algorithms. This paper shows one solution for this extension. The described method is based on using Columbus/CAN instead of GCC’s front end, and because Columbus has a well-structured schema for representing C++ sources, by this extension the compiler will have the ability to execute those special transformations on the code before the compiling phases. Furthermore this technique opens the possibility to connect other front ends – like Edison Design Group’s C++ front end – to GCC and achieve a more powerful compiler, for example in code size optimizations. This approach has been tested on small C projects like bzip2 as a realworld system, and on parts of the official Code-Size Benchmark Environment (CSiBE) of GCC.
[1] Tibor Gyimóthy,et al. A short introduction to Columbus/CAN , 2001 .
[2] Rudolf Ferenc,et al. Data exchange with the columbus schema for c++ , 2002, Proceedings of the Sixth European Conference on Software Maintenance and Reengineering.
[3] R. Ferenc,et al. Calculating Metrics from Large C + + Programs , 2004 .