Article View: gnu.g++.bug
Article #857Linker is missing symbols, when profiling is enabled with g++
From: Erik Schoenfelder
Date: Fri, 21 Aug 1992 16:45
Date: Fri, 21 Aug 1992 16:45
60 lines
2238 bytes
2238 bytes
Hi!
The host is a Sparcstation 2 with SunOS 4.1.1
GCC version 2.2.2 was configured:
> # GCC was configured as follows:
> ../gcc-2.2.2/configure sun4
and libg++ version 2.2 was configured:
> # This directory was configured as follows:
> ./configure sun4 -norecursion
Compiling with the -pg switch, causes the linker to report undefined
symbols. (This does not happen, if the libg++ is compiled without the
-g flag; but the default installation is with -g). Below an example:
> % cat pp.cc
> #include <fstream.h>
>
> main ()
> {
> cout << "hi nase\n";
> }
> % g++ -v -pg pp.cc
> Reading specs from /usr/local/lib/gcc-lib/sun4/2.2.2/specs
> gcc version 2.2.2
> /usr/local/lib/gcc-lib/sun4/2.2.2/cpp -lang-c++ -v -undef
> -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix
> -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix pp.cc
> /usr/tmp/cca21887.i
> GNU CPP version 2.2.2 (sparc)
> /usr/local/lib/gcc-lib/sun4/2.2.2/cc1plus /usr/tmp/cca21887.i -quiet
> -dumpbase pp.cc -version -p -o /usr/tmp/cca21887.s
> GNU C++ version 2.2.2 (sparc) compiled by GNU C version 2.2.2.
> as -o pp.o /usr/tmp/cca21887.s
> /usr/local/lib/gcc-lib/sun4/2.2.2/ld -e start -dc -dp /lib/gcrt0.o
> -L/usr/local/lib/gcc-lib/sun4/2.2.2 -L/usr/local/lib pp.o -lg++ -lgcc
> -lc_p -lgcc
> Undefined
> LBE60
> LBB60
> LBE50
> LBB50
> [...]
> LBB38
> LBE39
> LBB39
> collect: /usr/bin/ld returned 2 exit status
> % nm /usr/local/lib/libg++.a | grep LBE60
> U LBE60
> %
These undefined symbols seems to be contained in the stabs of libg++.a
(compiled with default CFLAGS=-g). It's seems to be an error in the
output of the debugging information, but i have no idea how to fix it.
Thanks, Erik.
Technical Details
Message-ID:
<9208211245.AA28975@helios>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!ibr.CS.tu-bs.DE!schoenfrShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!ibr.CS.tu-bs.DE!schoenfr From: schoenfr@ibr.CS.tu-bs.DE (Erik Schoenfelder) Subject: Linker is missing symbols, when profiling is enabled with g++ Message-ID: <9208211245.AA28975@helios> Sender: gnulists@ai.mit.edu Reply-To: schoenfr@ibr.cs.tu-bs.de Organization: GNUs Not Usenet Distribution: gnu Date: Fri, 21 Aug 1992 16:45:22 GMT Approved: bug-g++@prep.ai.mit.edu Lines: 61