In this page:
https://servernl1.sveena.com/lcov3987/c/s/c/port/lin/lindow.cpp.func-sort-c.html
there is this function
__static_initialization_and_destruction_0(int, int)
that is not covered.
What is this function? It is not in the source.
How do I cover it or exclude it?
Asked
Active
Viewed 560 times
1 Answers
0
For each translation unit that has a static global object which has to be constructed, gcc will generate a __static_initialization_and_destruction_0
function. The language mandates that all global objects are initialized before the first call to a function in the same translation unit.
Technically, I would assume that it is reached once you call a function from that translation unit, but maybe the coverage instrumentation does not generate code for it.
As it is an compiler-internal function, I would recommend to ignore it. I am not aware that lcov allows to define exclusions for indiviual functions.

Philipp Claßen
- 41,306
- 31
- 146
- 239