Dump coverage for all objects (a.out + dlopen()'d .so's)

with code coverage enabled, the main object as well as each dlopen()ed
shared library include their own copies of the hooks for dumping gcov
data upon receiving signal GCOV_FLUSH_SIGNAL.  Only the last one to
register was actually dumped.
Here, we chain the signal handlers together so that each one will call
the previously registered handler to ensure that each object's coverage
data is dumped.

Bug: 139313557
Test: dump gcov data via kill -37 on module with dlopen()
Change-Id: I376df2df6b65acff95ad5d135a7ba2bf0eac3695
1 file changed