Re: target/6428: [hppa*-hp-hpux] gmon.out is not generated when application to be profiled is linked with shared libgcc

"John David Anglin" <[email protected]>
Newsgroups gmane.comp.gcc.prs
Message-ID <[email protected]>
The following reply was made to PR target/6428; it has been noted by GNATS.

From: "John David Anglin" <[email protected]>
To: [email protected] (Dara Hazeghi)
Cc: [email protected], [email protected]
Subject: Re: target/6428: [hppa*-hp-hpux] gmon.out is not generated when application to be profiled is linked with shared libgcc
Date: Sat, 17 May 2003 12:46:39 -0400 (EDT)

 > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit- 
 > trail&database=gcc&pr=6428
 > 
 > Hello,
 > 
 > this bug was first mentioned a good while back, but there have been no  
 > updates in the audit trail. Has there been any progress on this issue?  
 > Is the bug still present in current gcc versions? Thanks,
 
 Yes, it still affects the current versions.  G++ by default uses the
 shared version of libgcc.  It has a hardcoded dependence on the shared
 non-profiled version of libc.  So, when you compile and link with
 "-p" or "-pg", the linking process resolves libc routines from the
 non-profiled version of libc.  This also would be an issue if any
 other shared library with a dependence on libc was linked into the
 application.
 
 The simplest work around is for the user to link with -static when
 using -p or -pg.  I had debated a doc update but haven't done it.
 
 Dave
 -- 
 J. David Anglin                                  [email protected]
 National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.