This is the mail archive of the
mailing list for the GCC project.
Generating an interface description for libraries
- To: gcc at gcc dot gnu dot org
- Subject: Generating an interface description for libraries
- From: Simon Watts <simon dot watts at marconi dot com>
- Date: 02 Nov 2001 14:42:35 +0000
Is there any way to generate or characterize the external interface
presented by a set of source which is intended to form a shared library
(which may have version numbering implications)?
This information is in the source, in the form of the external function
and object interfaces. We can *nearly* get this information by using
"nm" on the object files or resultant library. But there are a number
of limitations to this:
* Symbols for C functions doesn't capture the return or input
* Similarly, C++ doesn't capture the return types.
* The type of globals isn't incorporated.
...and probable other stuff as well.
What I am after is some characterization of an interface, which can then
be compared to a previous version to determine whether it is equivalent,
a superset (backwards compatible), a subset, intersection, or separate.
This is me being very lazy, and wondering about automatic versioning and
compatibility management of versioned libraries.
Yes, I know about libtool...
Simon A Watts
Philips Medical Systems
tel: +44(0) 1252 747 311