To build executable programs, special support routines are often needed in addition to the routines you provide. These support routines often perform tasks which cannot be done by the user, such as interfacing with the underlying operating system. These routines are kept in libraries.
In addition to libraries, other special files are required by an executable program, such as the startup file and the default linker directive file. The compiler driver automatically specifies these files and libraries when invoking the linker, unless the option -nostdlib is specified. This option does not add any default startup files or libraries to the linker command line.
When linking a program, the compiler driver normally specifies a startup file such as crt0.o before any user specified object files or libraries. This file contains a function named _start which is the default entry point for the program. The _start function performs initialization and then invokes main(). Please see Chapter 15, "Runtime Environment and Library Organization", for more information.
See Appendix C, "C Runtime Libraries", for a list of functions included in the libraries below.
The functions documented in the ANSI C Standard are contained in this library and libind.a, described below. After all user files and libraries on the command line, libansi.a should always be listed. Only libind.a should appear after libansi.a.
All transcendental math functions, such as sin and sqrt, are in the libind.a library. In addition, low-level support routines and system service functions are here. This library should always be the last file on the command line.