Re: dpkg-shlibdeps: warning: dependency on.... (they use none of its symbols)
В Tue, 24 Mar 2009 14:36:51 +0100, Bernhard R. Link написа:
>> http://sourceware.org/ml/binutils/2009-01/msg00413.html
>
> |(elf_link_add_object_symbols): Link in --as-needed libs if they |
> satisfy undefined symbols in other libs.
>
> I'm not into bfd enough to understand what it actually does, but both
> things I can imagine would be another argument against using it:
Provided that I understood your example well, it was describing a
scenario like this:
program
| \
| \
libB \
| (explicit link while not actually using libA)
| /
libA----/
With the old behavior of --as-needed the dependency on libA would
indeed be dropped, which is a problem. Now it will be retained,
assuming that libB uses symbols from libA (which is my understanding
of the biggining of your example -- "Assume a program uses libB, which
uses libA...").
There will be dpkg-shlibdeps warning ("dependency on libA could be
avoided as usr/bin/program does not use any of its symbols...") but
that's just a warning.
> 2) if it means to not remove a library that is already needed by a
> library needed
Yes.
> while it would silence warnings for the cases you would want to know
> about: linking against libraries not used at all.
Why? It would warn you that depending on libA is useless, but as the
maintainer of the program package you already know that's not true.
Reply to: