Hi,
I'm trying to find the CRT source files with little luck. They are added
to an executable at load-time and seem to do the following:
collect2 - A hack for object oriented languages (C++) to call a second
compilation to create object constructors. Collect2 calls ld to link the
specified files, then it looks for special constructor function names
and, if found, creates a new temporary ".c" file containing a table of
constructor functions, re-invokes the compiler, and links the program a
second time including the temporary ".o" file.
http://gcc.gnu.org/onlinedocs/gccint/Collect2.html
ld - Called by collect2. It is the linking loader which combines the
list of relocatable object modules
ld-linux.so.2 - Dynamic loader linked (combined) into your program.
Catches calls to library functions (i.e., printf) and see if the
function has already been loaded by a previous program. If so, just jump
to that in-memory page. Otherwise, read the library function into a new
page and jump to it.
crt0.o - C Run-Time Zero launcher. Used with "ar" absolute archive
library file formats.
crt1.o - C Run-Time One launcher. Used with ELF dynamic library formats.
Starts a location zero where the OS will begin execution. Jumps to main()
crti.o - C Run-Time Initialize? launcher. Used for odd processor
architecture initialization.
crtbegin.o - Used to execute functions located in the ".init" section
which call Java static data constructors.
/tmp/ccPzplAb.o - Your temporary relocatable object file.
crtend.o - Used to execute functions located in the ".fini" section
which calls Java data destructors.
crtn.o - Closes any open file descriptors and returns to the operating
system via the exit() service.
I cannot find these files in binutils-2.17.tar.gz, glibc-2.4.tar.gz, or
libtool-2.2.tar.gz
Thank you for ant assistance you can provide.
Regards,
Tobin Maginnis