[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Detecting transitive ABI dependencies with libabigail?



Could libabigail be leveraged to answer the following question:

Given a library libprovider.so and a library libuser.so, I'd like to
know whether the ABI of libuser.so requires knowledge of types,
functions, or values exported by the ABI of libprovider.so. In other
words, is it the case that to meaningfully use the ABI of libuser.so
one must link to libprovider.so?

In particular, I'd like to distinguish the case where libuser.so makes
use of libprovider.so purely internally, meaning that someone linking
to libuser.so does not necessarily need to link explicitly to
libprovider.so, from the case where libuser.so makes use of objects
from libprovider.so in its ABI, and therefore does induce such a
transitive dependency on libprovider.so.

- Is the information provided by running abidw on both libuser.so and
libprovider.so sufficient to answer this question?
- How would one approach writing such a tool given the facilities
already available in libabigail?

I'm hoping to build something which can act as a lint tool to evaluate
whether a given project is using the CMake style
public/private/interface library dependency annotations correctly.
Most notably, I'd like to be able to find library dependencies that
are declared public, but could/should be weakened to private.

Thanks,
Andrew