Hi. This explains why the option in $subject is needed when one uses dlopen API of a shared library.
Ready for trunk? Martin gcc/ChangeLog: 2018-01-26 Martin Liska <mli...@suse.cz> PR gcov-profile/83879 * doc/gcov.texi: Document necessity of --dynamic-list-data when using dlopen functionality. --- gcc/doc/gcov.texi | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/gcc/doc/gcov.texi b/gcc/doc/gcov.texi index b55ee852ef9..6157e8bbf7c 100644 --- a/gcc/doc/gcov.texi +++ b/gcc/doc/gcov.texi @@ -788,6 +788,8 @@ Instrumented applications use a static destructor with priority 99 to invoke the @code{__gcov_dump} function. Thus @code{__gcov_dump} is executed after all user defined static destructors, as well as handlers registered with @code{atexit}. +If an executable loads a dynamic shared object via dlopen functionality, +@option{-Wl,--dynamic-list-data} is needed to dump all profile data. @c man end