Gcc static linking problems

Alexandre Oliva aoliva@redhat.com
Tue Aug 12 00:42:00 GMT 2003


On Aug 11, 2003, Claudio Bley <bley@cs.uni-magdeburg.de> wrote:

> Static linking is certainly a simple way to make sure the application
> is runnable on the user's system.

Except when it isn't.  For example, glibc relies on dlopening nsl
implementations, that are assumed to use data structures compatible to
those you may have statically linked with.  If they're not compatible,
the program may crash unpredictably.  So static linking is not the
silver bullet it used to be a decade ago or so.  As an additional
non-GNU/Linux data point, more along the lines of the original
question: I'm told Solaris won't even support static linking in the
near future.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer



More information about the Gcc-help mailing list