Bart Smaalders wrote: > I notice that even trivial programs depend on libc's private symbols: > > barts at cyber:/tmp 126% cat t.c > #include <stdio.h> > int main() > { > printf("hello, world\n"); > } > barts at cyber:/tmp 127% gcc -o t t.c > barts at cyber:/tmp 128% pvs t > libc.so.1 (SUNWprivate_1.1, SYSVABI_1.3); > > This makes pvs less than useful for chasing down possible > dependency issues.... why does this happen? > > - Bart >
It seems to have something to do with the glue that cc adds when it links the executable. Consider: % cc -c t.c % ld -o t t.o -lc % pvs t libc.so.1 (SYSVABI_1.3); Unfortunately: % ./t hello Segmentation Fault (core dumped) So, something in the code that cc adds to the program (crti.o ?) has a dependency on a symbol in SUNWprivate_1.1. Incidently, I get the same result on an old S9 box I have at home, so it's been like this for some time... - Ali