shared libraries on Solaris (and other SVR4 systems?)
Alexandre Oliva
oliva@dcc.unicamp.br
Tue Sep 22 19:31:00 GMT 1998
Dimitri PAPADOPOULOS-ORFANOS <papadopo@shfj.cea.fr> writes:
> Using egcs-1.0.2, the linker links with libfoo.so.1.0.
> Using egcs-1.1, the linker links with libfoo.so.
> Of course, the program should always link against libfoo.so.1.0.
Why? IMO, egcs should follow whatever standard the underlying OS
defines. If the standard linker looks for libfoo.so, so should egcs
and GNU binutils. If a library does not have a soname (-h), the
standard library name should be recorded in the program linked with
it.
Shared libraries are not as portable as you may think. The only way
to create libraries in a reasonably portable way is to use GNU
libtool.
> * in egcs-1.0.2 `ld' is called with option `-h libfoo.so.1.0'
> and option `-o libfoo.so.1.0'
> * in egcs-1.1 `collect2' is called with option `-o libfoo.so.1.0'
> only
IMO, egcs 1.0.2 is wrong, there's no reason to force the `-h' flag.
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil
More information about the Gcc-bugs
mailing list