gcov and Wine (was: Re: Wine cabinet.dll FDI Conformace Test Patch)

Dan Kegel dank at kegel.com
Tue Mar 1 21:54:54 CST 2005

Mike Hearn wrote:
> By the way, I talked to Alexandre about the GCOV stuff, basically he wants
> us to find out why arc profiling borks the preloader. Then the idea is it
> can be enabled just using CFLAGS.

(You're confusing the UCLA guys with the Harvey Mudd guys, Mike!)

Here's what aarvey at cs.hmc.edu wrote when he ran into the problem:
> make[1]: Entering directory `/home/aarvey/winefromwinehqcvs/wine.patched/loader'
> gcc -o wine-preloader -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x78000000 preloader.o -L../libs/port -lwine_port
> preloader.o(.text+0x1929): In function `_GLOBAL__I_wld_startGCOV':
> /home/aarvey/winefromwinehqcvs/wine.patched/loader/preloader.c:955: undefined reference to `__bb_init_func'
> collect2: ld returned 1 exit status
> make[1]: *** [wine-preloader] Error 1
> make[1]: Leaving directory
> `/home/aarvey/winefromwinehqcvs/wine.patched/loader'
> make: *** [loader] Error 2
> I can compile the preloader just dandy as long as I get rid of the extra
> compile flags (-ftest-coverage and -fprofile-arcs). 

You could provide a dummy implementation of __bb_init_func
in the preloader, but that's uglier IMHO than just not
passing those options when compiling the preloader.

Mike also asked:

 > Until that happens though are you generating lcov output anywhere?

Not yet, but I'll ask them to start doing periodic LCOV runs
and putting them up on the web.  I'd like to see this be
a regular feature at winehq.org, not sure what the logistics
would be.
- Dan

Trying to get a job as a c++ developer?  See http://kegel.com/academy/getting-hired.html

More information about the wine-devel mailing list