Because of Ada semantics, portions of the source code may be shared among several object files. This is the case for example when generics are involved, when inlining is active or when declarations generate initialisation calls. In order to take into account this shared code, you need to call gcov on all source files of the tested program at once.
The list of source files might exceed the system’s maximum command line
length. In order to bypass this limitation, a new mechanism has been
implemented in gcov: you can now list all your project’s files into a
text file, and provide this file to gcov as a parameter, preceded by a
Note that on AIX compiling a static library with -fprofile-arcs is not supported as there can be unresolved symbols during the final link.