Do you know a good, concise (not a book, possibly free documentation) reference that explains the basics of how a c++ compiler works? I think it'd be beneficial for better understanding some rules of c++ programming.
Four Steps of Compilation: preprocessing, compiling, assembly, linking.
There are three basic steps involved in compiling a C program: preprocessing, compilation of C source code to machine code (or assembly) (also called object code), and linking of multiple object files into a single binary executable program.
Linking is the final stage of compilation. It takes one or more object files or libraries as input and combines them to produce a single (usually executable) file.
GCC Internals free ebook.
The purpose of this book is to address the demands of GCC hackers. We start with a description of GCC 3.4.1 architecture focusing on the source code parser. We chose this version of GCC because we used this version mostly. Then we address the problem of extension development. We present the GCC Extensibility Modules (GEM) project in the next chapter. GEM provides a number of hooks throughout GCC source code. It is implemented as a patch to GCC. A GEM-based compiler extension is developed as a stand-alone program. When the extension is completed, only its source code is distributed compared with distributing the source code of the GCC if GEM is not used. We give examples that demonstrate GEM programming at the end of the book.
(EDIT: Sorry, I missed you don't want a book. But I still think this is great resource of information you are looking for. You certainly don't need to read it as a whole, you can go only through the sections you are interested in.)
I found this university site which explains the steps of the compilation process. It covers how to compile your code into an executable, a shared library, or a dynamically linked library using GCC. It also covers how the compiler knows where to look for header files and libraries, and other topics.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With