From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,b772008669734662,start X-Google-Attributes: gidfee84,public From: "Stefan Monnier" Subject: shared libraries Date: 1995/05/22 Message-ID: <3pq4go$765@info.epfl.ch>#1/1 X-Deja-AN: 103022657 organization: Ecole Polytechnique Federale de Lausanne newsgroups: comp.unix.osf.osf1 originator: monnier@lia.di.epfl.ch (Stefan Monnier) How do the .a libraries work ? While explaining to a friend about the shared libraries, he pointed out to me "you said all the standard libs were shared, but libc is a .a so it's not shared". Of course he was right the libc is libc.a and libc.so, but still: it's shared. So how does it work ? ~/tmp-0> cat test.c main () { printf("hello"); } ~/tmp-0> cc -o testtata -L. test.c -ltata ~/tmp-0> cc -o testc -L. test.c -lc ~/tmp-0> ls -AlF total 218 lrwxrwxrwx 1 monnier dilia 15 May 22 15:37 libtata.a@ -> /usr/lib/libc.a -rw-r--r-- 1 monnier dilia 29 May 22 14:56 test.c -rwxr-xr-x 1 monnier dilia 23691 May 22 15:43 testc* -rwxr-xr-x 1 monnier dilia 187477 May 22 15:43 testtata* ~/tmp-0> Obviously libtata is the exact same thing as libc. Why is libc dynamically linked whereas libtata is statically linked ? What's the point of .so libraries then ? Stefan