public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* target/6428: gmon.out is not generated when application to be profiled is linked with shared libgcc
@ 2002-04-23 9:06 dave
0 siblings, 0 replies; only message in thread
From: dave @ 2002-04-23 9:06 UTC (permalink / raw)
To: gcc-gnats
>Number: 6428
>Category: target
>Synopsis: gmon.out is not generated when application to be profiled is linked with shared libgcc
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Apr 23 09:06:03 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Dave Anglin
>Release: gcc 3.1 (prerelease)
>Organization:
>Environment:
hppa*-hp-hpux*
>Description:
Using g++.old-deja/g++.law/profile1.C,
g++ -pg -o profile1 profile1.C
./profile1
no gmon.out file is generated.
Whereas,
gcc -pg -o profile1 profile1.C
./profile1
produces a gmon.out file.
gcc -pg -o profile1 profile1.C -shared-libgcc
./profile1
does not produce a gmon.out file.
.
When using g++, we have the following link command:
/opt/gnu/lib/gcc-lib/hppa2.0w-hp-hpux11.11/3.1/collect2 -L/lib/pa1.1 -L/usr/lib/pa1.1 -z -u main -o profile1 /usr/ccs/lib/gcrt0.o -L/opt/gnu/lib/gcc-lib/hppa2.0w-hp-hpux11.11/3.1 -L/usr/ccs/bin -L/usr/ccs/lib -L/opt/langtools/lib -L/opt/gnu/lib/gcc-lib/hppa2.0w-hp-hpux11.11/3.1/../../.. /var/tmp//cccLhdMV.o -lstdc++ -lm -lgcc_s -lgcc -L/lib/libp/ -lc -lgcc_s -lgcc
As can be seen, -lgcc_s occurs before -L/lib/libp/ -lc.
The shared library list for libgcc_s.1 is:
shared library list:
dynamic /usr/lib/libc.2
This version of libc isn't suitable for profiling.
Looking at the undefined symbols in the object, there
are various undefined references including _close.
I appears that various routines are duplicated and
probably the wrong version of close is being called
at exit.
/usr/libp contains libc.a and libpthread.a. There
is no shared libc support for profiling. As a result,
it doesn't make any sense to use shared libraries with
"-pg".
>How-To-Repeat:
>Fix:
Add "-static" to link command. Update specs.
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-04-23 16:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-23 9:06 target/6428: gmon.out is not generated when application to be profiled is linked with shared libgcc dave
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).