Multiple calls to __gcov_init

Joe Buck Joe.Buck@synopsys.COM
Tue Apr 25 16:39:00 GMT 2006


On Tue, Apr 25, 2006 at 03:05:26PM +0200, Richard Guenther wrote:
> On 4/25/06, Momchil Velikov <velco@fadata.bg> wrote:
> >   Why does GCC emit multiple calls to __gcov_init, via mulitple (two) entries in
> > the ctors table? For example "int foo () { return 0; }" compiled with "gcc -S
> > -fprofile-generate" produces the following assembly file, where the ".ctors"
> > section conrtains two entries.
> 
> -funit-at-a-time fixes it.  But who uses -fprofile-generate with -O0
> these days...

gcov is used for coverage testing, and these are best run at -O0.



More information about the Gcc mailing list