-nostdlib
Do not use the standard system startup files or libraries when linking.
No
startup files and only the libraries you specify will be passed to the
linker.
The compiler may generate calls to "memcmp", "memset", "memcpy"
and "memmove". These entries are usually resolved by entries in libc.
These entry points should be supplied through some other mechanism
when this option is specified.
One of the standard libraries bypassed by -nostdlib and -nodefaultlibs
is libgcc.a, a library of internal subroutines that GCC uses to overcome
shortcomings of particular machines, or special needs for some
languages.
In most cases, you need libgcc.a even when you want to avoid other
standard libraries. In other words, when you specify -nostdlib or
-nodefaultlibs
you should usually specify -lgcc as well. This ensures that you have no
unresolved references to internal GCC library subroutines. (For
example,
__main, used to ensure C++ constructors will be called.)
-nostdinc
Do not search the standard system directories for header
files. Only the
directories you have specified with -I options (and the directory of
the current
file, if appropriate) are searched.
-nostdinc++
Do not search for header files in the C++-specific standard
directories, but do
still search the other standard directories. (This option is used
when building the C++ library.)
Hello everyone,
I am not sure whether this is useful or not, but I just read these
information, and looks
like it has similar functions to some of the patches in the book.
Any comments?
William Zhou
_______________________________________________
Clfs-dev mailing list
[email protected]
http://ninja.linux-phreak.biz/mailman/listinfo/clfs-dev