delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/02/24/16:34:04

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:content-type:content-transfer-encoding; q=dns; s=default; b=Muw
GYrAO4CSB8lOds8gcj7Cf2O1MBXPZwtVuTCrcBDVdWO8fWu9tRosshB4FDgx8yvW
qGanKhiQ+3NCopXvyFFUm/18hJ849sNV2kgmhEABdRrW8TTbgaofComgf5yPRGIV
Pq7tRY4H2BELhrCUXgNEBPCxYzeh8msHbcOvxqDg=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:content-type:content-transfer-encoding; s=default; bh=iLlFUGO2t
ygP6t3ScVTIQR7qlHU=; b=tScvESzWCxbF+ge0K5aeZP83UGSxIJ9mI7kN8imgr
Xew7TMVeo90+49/uYs/zEDnSRbbrdldzTk/OUhhpQ5TqfSKXJZHFgdl169yP0hsl
Cv2LvNGyO7gRMB8rz4MG9W3Ay4FC/d/91RG+syJMQI4eOwCMIYUxJrVP61ZU8B37
qc=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2
X-HELO: smtpq4.tb.mail.iss.as9143.net
Message-ID: <54ECEE37.80603@quicknet.nl>
Date: Tue, 24 Feb 2015 22:33:43 +0100
From: Teun Burgers <a DOT rburgers AT quicknet DOT nl>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: mingw-runtime 4.01: empty libgmon.a
X-Ziggo-spambar: /
X-Ziggo-spamscore: 0.0
X-Ziggo-spamreport: CMAE Analysis: v=2.1 cv=ZY6xTJhA c=1 sm=0 tr=0 a=4Y1Az08UtVsA:10 a=N659UExz7-8A:10 a=cIF5Tx0qAAAA:8 a=0HtSIViG9nkA:10 a=NEAV23lmAAAA:8 a=zEtbaHnpkyodKjhC3SEA:9 a=pILNOxqGKmIA:10 xcat=Undefined/Undefined none
X-Ziggo-Spam-Status: No

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019