I need to use gcov to test coverage of a shared library where I have ownership of the source code for the library, but I do not have the source code for the executable test program that uses the library. Is there a way for gcov to provide coverage analysis of a shared library without building the main() program that uses the shared library?
All the examples I have seen show the main() program is built with gcov. I have used gcov to build the .gcno files that correspond to the .so file. I have been able to use gcov to build a test program that I have source code for that uses the shared library and get it to generate execution trace .gcda files for the shared library objects.
However, I have external users of the library that have their own executable programs that use the library and I need to test code coverage with those programs but I do not have access to their source code.