This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

mingw-runtime 4.01: empty libgmon.a


the libgmon.a is an empty archive. These are the contents of
/usr/i686-pc-mingw32/sys-root/mingw/lib/libgmon.a

$ od -c libgmon.a
0000000   !   <   a   r   c   h   >  \n
0000010

This becomes a problem when attempting to prepare an executable for profiling with gprof

/bin/i686-pc-mingw32-gcc.exe -pg -o hello hello.c

result:

/usr/i686-pc-mingw32/sys-root/mingw/lib/gcrt2.o: In function `monstartup':
/usr/src/debug/mingw-runtime-4.0-1/misc/gpl/profile/gcrt0.c:46: undefined reference to `monstartup'
/usr/src/debug/mingw-runtime-4.0-1/misc/gpl/profile/gcrt0.c:47: undefined reference to `_mcleanup'
/tmp/ccPFHeDJ.o:hello.c:(.text+0xa): undefined reference to `mcount'
collect2: error: ld returned 1 exit status

I replaced libgmon.a with this one:

https://github.com/jonasstrandstedt/MinGW/blob/master/MinGW/lib/libgmon.a

and then the profiling for i686-pc-mingw32 works fine.

Maybe a next release of mingw-runtime can include a functional libgmon.a ?

Kind regards,

Teun Burgers

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]