Philip Brown wrote:
On Wed, Mar 25, 2009 at 06:31:22AM +0100, Roger Håkansson wrote:
Philip Brown wrote:
nope. direct link.
dump -Lv says it is directly "needed".
Well, that isn't so strange, if you link gedit with libX and a function in libX needs libnet, you'll have to put -lnet when you link gedit, and then dump will tell you that both libX and libnet is "needed". If you later on rebuild libX without any libnet support, libX will no longer require libnet, but gedit still will...

incorrect.
that's why we register dependancies the way we do.

dump -Lv works differently than ldd.

It depends on how libX was created, if it was linked with "-l net" at creation, gedit didn't need to be linked to libnet, but if libX wasn't gedit had to be linked to libnet.

Example:
main.c calls a(), located in liba.so, which calls b() located in libb.so

ld -G -L. -o liba.so a.o -l b
cc -L. -o main main.c -la
dump -Lv liba.so |grep NEEDED
[1]     NEEDED          libb.so
dump -Lv main |grep NEEDED
[1]     NEEDED          liba.so
[2]     NEEDED          libc.so.1
ld -G -L. -o liba.so a.o
cc -L. -o main main.c -la -lb
dump -Lv liba.so |grep NEEDED
dump -Lv main |grep NEEDED
[1]     NEEDED          liba.so
[2]     NEEDED          libb.so
[3]     NEEDED          libc.so.1

_______________________________________________
maintainers mailing list
[email protected]
https://lists.opencsw.org/mailman/listinfo/maintainers

Reply via email to