We're targeting a new OS with GCC. I've done some of these before, but I've run into one issue I don't recognize, and a second that I have obviously messed up. I have looked at "Using and Porting" and "GCC Internals". The answers may be there, but I did not find them -- pointers welcome.
1. Versions of crtbegin There are three versions of crtbegin: crtbegin.o, crtbeginS.o, crtbeginT.o. 'S' is for shared/PIE -- I understand about that. Can somebody explain what the distinction is between crtbeginT.o and crtbegin.o? 2. Is there a simple way to configure the compiler so that the default compilation model (in the absence of command-line directives) is --static? If not, which of the various specfile macros need to be updated? I know how to write specfile lines, I just want to make sure that I don't miss one somewhere. 3. At least on i386, there are GOT sections appearing in crt{begin,end}.o and libgcc.a. Our target does not have any dynamic linking/loading support AT ALL. Are these sections fully resolved after link time? Thanks Jonathan Shapiro