1 Oct 2009 02:08
Re: libgcc_s.so.0 on HP-UX
Ian Lance Taylor <iant <at> google.com>
2009-10-01 00:08:42 GMT
2009-10-01 00:08:42 GMT
Leonardo <sombriks <at> gmail.com> writes:
> is possible to compile using gcc but don't have dependencies on
> libgcc_s.so.0,libunwind.so.1 and so on?
Strictly speaking, yes, it is possible. A program which is simply
"int main() { }" will normally not need those libraries. On
GNU/Linux, when using sufficiently new versions of the linker, gcc
will use the --as-needed linker option so that the libraries are only
marked as required when they are, in fact, required.
However, gcc does require functions from those libraries for various
different purposes. If gcc generates code which needs those
libraries, then those libraries will be needed, and there is nothing
useful to be done about it.
Ian
RSS Feed