+
+
+<!-- *********************************************************************** -->
+<div class="doc_section">
+ <a name="cfe_code">Questions about code generated by the GCC front-end</a>
+</div>
+
+<div class="question">
+<p>
+What is this <tt>__main()</tt> call that gets inserted into <tt>main()</tt>?
+</p>
+</div>
+
+<div class="answer">
+<p>
+The <tt>__main</tt> call is inserted by the C/C++ compiler in order to guarantee
+that static constructors and destructors are called when the program starts up
+and shuts down. In C, you can create static constructors and destructors by
+using GCC extensions, and in C++ you can do so by creating a global variable
+whose class has a ctor or dtor.
+</p>
+
+<p>
+The actual implementation of <tt>__main</tt> lives in the
+<tt>llvm/runtime/GCCLibraries/crtend/</tt> directory in the source-base, and is
+linked in automatically when you link the program.
+</p>
+
+</div>
+
+
+