I have been looking around for an ABI cross-check tool. Now I have met some of the tools suggested in other questions, such as in these questions:

[How to test binary compatibility automatically?](https://stackoverflow.com/questions/1970296/how-to-test-binary-compatibility-automatically)

[Static analysis tool to detect ABI breaks in C++](https://stackoverflow.com/questions/1969916/static-analysis-tool-to-detect-abi-breaks-in-c)

Now, this is not exactly what I am trying to do - as these track ABI changes between versions.

I was wondering that given project source files + library header file and library .so file, as well as a compiler version (which is used for compiling both the library and the project), is it possible to cross check that the output of the ABI matches the compiled library?

So, the situation that it would apply to, is if an upstream library shipped libfoo.so and libfood.so. Where food is a slightly different ABI, (say doubles instead of float), but not so far that it wont compile. 

* Is it possible to come up with a test (possibly not bulletproof) that says that the compiled executable has linked against the correct lib?
* Are there tools that do this?