This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
problems profiling under gcc-2.95.2
- To: bug-gcc at gnu dot org
- Subject: problems profiling under gcc-2.95.2
- From: David Magerman <magerman at rentec dot com>
- Date: Wed, 10 May 2000 08:35:54 -0400
- cc: magerman at bat dot rentec dot com
We are having trouble profiling C++ programs under gcc-2.95.2 on a
Solaris2.7 system. Simple cases work fine, but we have a program
which tries to access environment variables in global initializers,
and this fails. All calls to "getenv" before main return a NULL
value. Once we get to main, "getenv" calls return the appropriate
value.
We have traced the problem down to the libraries in /usr/lib/libp,
which I am guessing are the profiled versions of the libc and libm
libraries. When I hide these libraries from the bind step, everything
works fine, and I get a reasonable profile of my program. But when I
link with these libraries, the program fails because of this getenv
problem.
I'm going to pursue the problem with Sun to see if they can give me
more details about what the libp libraries are doing. But I was
hoping that someone might have experienced a similar problem and would
know how to handle it.
Thanks in advance,
-- David Magerman
magerman@rentec.com
P.S. - One more random symptom: when I bind with the libp libraries, I
am forced to explicitly bind in libdl, whereas the unprofiled bind
doesn't require libdl. Don't know if that is related or not.