http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57121
--- Comment #6 from Netra <netravathi.muniraju at asia dot thalesgroup.com> 2013-05-02 01:40:13 UTC --- If I understand ur previous comments, instead of -lgcov i need to use -fprofile-generate in the following lines : LDFLAGS = $(DEBUGOPT) $(GCOV_CFLAGS) -fprofile-generate -fPIC -m32 -s -O -shared else LDEXEFLAGS = $(DEBUGOPT) -m32 -O LDFLAGS = $(DEBUGOPT) $(GCOV_CFLAGS) -fprofile-generate -lgcov -fPIC -m32 -O -shared endif made the same changes and given for compilation.