Re: Not everyone is linking shared libraries to libc
On Fri, Feb 23, 2001 at 07:10:06PM +0100, Wichert Akkerman wrote:
> Previously Ben Collins wrote:
> > Since this will not link to libc, nor does it include any of the crt?.o
> > files (constructor/destructor for the library, helps ld.so). It must be
> > linked like:
> >
> > gcc -Wl,-soname,libfoo.so.1 -shared foo.o blah.o -o libfoo.so.1
>
> Shouldn't there be a -lc in there?
No, check the -v output. gcc adds the -lc to the ld command line (via
collect2). Also check /usr/lib/gcc-lib/*/*/specs, it might prove
interesting in the context of this discussion.
Ben
--
-----------=======-=-======-=========-----------=====------------=-=------
/ Ben Collins -- ...on that fantastic voyage... -- Debian GNU/Linux \
` bcollins@debian.org -- bcollins@openldap.org -- bcollins@linux.com '
`---=========------=======-------------=-=-----=-===-======-------=--=---'
Reply to: