Subject: shared libraries, slow progress
To: None <port-pmax@NetBSD.ORG>
From: Erik Bertelsen <erik@sockdev.uni-c.dk>
List: port-pmax
Date: 12/03/1996 15:15:34
I'm still trying to get shared libraries to work.

Right now, I'm in the situation that the binutils (ie. as and ld) are
linked sharable with libbfd and libopcodes, but statically with
the /usr/lib-stuff.

I have gotten ldd to work somewhat by removing its test for the arguments
to it being dynamically linked a.out files. This version of ldd can
confirm the status mentioned above.

When I rebuild libraries, I now get .so libraries in addition to the .a
libraries, but my executables still seem to get linked non-dynamically.

I have installed Manuel Bouyers patches to /usr/share/mk.

I notice that the .so libraries are being built from the same .o files as
the .a libraries. But this is also the case with libbfd and libopcodes in
binutils. Is this a consequence of elf or of using a more "standard"
gnu toolchain?

I notice that binutils builds the shared libraries with a command like
   cc -shared *.o -o lib.so.0.0
which looks that its going to "link" with crt0.o, libc.a and their
friends. But linking one of the /usr/lib libraries this way (I took
libtelnet because it is much smaller than libc and then I used telnet
as the test application), did not seem to make any difference, the
executable file was still not dynamically linked.

Any further advice sought !!

Anyway, Jonathan, can you send me a copy of your /usr/share/mk files
for shared libraries so that I can check my patched versions ?

Can you confirm (or deny) that I should use un-modified sources
from /usr/src/lib/... (Manuel Bouyers patches contain a lot of
/usr/src/lib patches, but they are rejected by patch, and I seem
to recall that you have committed all the needed source changes
to the current sources. What about is crt0.c or the current crt0.S?

regards
Erik Bertelsen