gcov provides wrappers for the exec*() calls but there's none for execveat(), which means we lose all coverage prior to the call. To mitigate this, let's add a simple execveat() wrapper in gcov's style[0], which dumps and resets the coverage data when needed. This applies only when we're built with -Dfexecve=true. [0] https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libgcc/libgcov-interface.c;h=b2ee930864183b78c8826255183ca86e15e21ded;hb=HEAD
../src/basic/coverage.h:15:48: warning: function '_coverage__exit' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
To make sure we don't miss any _exit() calls let's move the coverage-related tweaks into a separate header file and include it explicitly on the compiler command line using -include when a coverage build is requested. Follow-up to c6552ad381.
c6552ad381