bug-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unable to build working binaries (GCC 3.2 / binutils 2.12.1 or 2.13)


From: Andreas Borchert
Subject: Unable to build working binaries (GCC 3.2 / binutils 2.12.1 or 2.13)
Date: 11 Sep 2002 12:03:27 +0200
User-agent: slrn/0.9.7.0 (SunOS)

I have tried to build the GNU Compiler Collection 3.2 on Solaris 9
(UltraSPARC platform) which was configured to use GNU binutils. I have
tried it initially with binutils 2.13 and, because of a problem reported
with 2.13 (see <address@hidden> in
gnu.utils.bug), also with 2.12.1. gcc seems to work fine but binaries
built by g++ crash immediately with a segmentation violation:

baltrum# cat x.C
#include <iostream>

using namespace std;

int main() {
   cout << "Hi Adi!" << endl;
}
baltrum# LD_RUN_PATH=/usr/local/lib g++ -v -o x x.C
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.2/specs
Configured with: /var/playground/ULMgcc3/src/gcc-3.2/configure --with-gnu-as 
--with-as=/usr/local/bin/as --with-gnu-ld --with-ld=/usr/local/bin/ld
Thread model: posix
gcc version 3.2
 /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.2/cc1plus -v -D__GNUC__=3 
-D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=0 -D__GXX_ABI_VERSION=102 -Dsparc 
-Dsun -Dunix -D__svr4__ -D__SVR4 -D__PRAGMA_REDEFINE_EXTNAME -D__sparc__ 
-D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__PRAGMA_REDEFINE_EXTNAME -D__sparc 
-D__sun -D__unix -Asystem=unix -Asystem=svr4 -D__NO_INLINE__ 
-D__STDC_HOSTED__=1 -D_XOPEN_SOURCE=500 -D_LARGEFILE_SOURCE=1 
-D_LARGEFILE64_SOURCE=1 -D__EXTENSIONS__ -D__SIZE_TYPE__=unsigned int 
-D__PTRDIFF_TYPE__=int -D__WCHAR_TYPE__=long int -D__WINT_TYPE__=long int 
-D__GCC_NEW_VARARGS__ 
-Acpu=sparc -Amachine=sparc x.C -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS 
-quiet -dumpbase x.C -version -o /tmp/ccTlHCqy.s
GNU CPP version 3.2 (cpplib) (sparc ELF)
GNU C++ version 3.2 (sparc-sun-solaris2.9)
        compiled by GNU C version 3.2.
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory "/usr/local/sparc-sun-solaris2.9/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include/c++/3.2
 /usr/local/include/c++/3.2/sparc-sun-solaris2.9
 /usr/local/include/c++/3.2/backward
 /usr/local/include
 /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.2/include
 /usr/include
End of search list.
 /usr/local/bin/as -V -Qy -s -o /tmp/ccK5QOml.o /tmp/ccTlHCqy.s
GNU assembler version 2.12.1 (sparc-sun-solaris2.9) using BFD version 2.12.1
 /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.2/collect2 -V -Y 
P,/usr/ccs/lib:/usr/lib -Qy -o x 
/usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.2/crt1.o 
/usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.2/crti.o /usr/ccs/lib/values-Xa.o 
/usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.2/crtbegin.o 
-L/usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.2 
-L/usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.2/../../../../sparc-sun-solaris2.9/lib
 -L/usr/ccs/bin -L/usr/ccs/lib 
-L/usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.2/../../.. /tmp/ccK5QOml.o 
-lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc -lc /usr/lo
cal/lib/gcc-lib/sparc-sun-solaris2.9/3.2/crtend.o 
/usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.2/crtn.o
GNU ld version 2.12.1
  Supported emulations:
   elf32_sparc
   elf64_sparc
baltrum# ./x
Segmentation Fault(coredump)
baltrum# mdb x core
Loading modules: [ libc.so.1 ld.so.1 ]
> $C
ffbff540 libgcc_s.so.1`__register_frame_info_bases+0x30(ff2b0000, ff2b0000, 0, 0
, ff3de040, 10000)
ffbff5b0 0xff2b16a8(ff3c935c, 1, 2cdd4, 2d368, ff3cfcb4, 0)
ffbff620 0xff2b1590(0, 0, ff3f61dc, 2d368, ff3cc1d0, 0)
ffbff680 ld.so.1`call_init+0x150(80000, ffdfffff, ff3f66cc, ff3f6168, 200000, 0
)
ffbff6e0 ld.so.1`setup+0xf6c(ff3f6080, 0, ff3f6158, 0, ff3b0050, 10094)
ffbff838 ld.so.1`_setup+0x368(0, 0, ffbfffe9, ffbffff9, 0, ff3d6a18)
ffbff8e8 ld.so.1`_rt_boot+0x88(0, 0, 0, 0, 0, 0)
ffbff988 0(0, 0, 0, 0, 0, 0)
> $r
%g0 = 0x00000000                 %l0 = 0x00000000
%g1 = 0xff2b5f5c libgcc_s.so.1`__register_frame_info_bases %l1 = 0x00000000
%g2 = 0x00000000                 %l2 = 0x00000000
%g3 = 0x00000000                 %l3 = 0x00000000
%g4 = 0x00000000                 %l4 = 0x00000000
%g5 = 0x00000000                 %l5 = 0x00000000
%g6 = 0x00000000                 %l6 = 0x00000000
%g7 = 0x00000000                 %l7 = 0xff2c7eb0
%o0 = 0xff2b0000 libgcc_s.so.1`.umul@@SYSVABI_1.3 %i0 = 0xff2b0000
libgcc_s.so.1`.umul@@SYSVABI_1.3
%o1 = 0x00000098                 %i1 = 0xff2b0000
libgcc_s.so.1`.umul@@SYSVABI_1.3
%o2 = 0x00000088                 %i2 = 0x00000000
%o3 = 0x00000000                 %i3 = 0x00000000
%o4 = 0x00000000                 %i4 = 0xff3de040 ld.so.1`_lwp_cond_broadcast
%o5 = 0x00000000                 %i5 = 0x00010000
%o6 = 0xffbff540                 %i6 = 0xffbff5b0
%o7 = 0xff2b5f74 libgcc_s.so.1`__register_frame_info_bases+0x18 %i7 = 0xff2b16a8


 %psr = 0xfe000001 impl=0xf ver=0xe icc=nzvc
                   ec=0 ef=0 pil=0 s=0 ps=0 et=0 cwp=0x1
   %y = 0x00000000
  %pc = 0xff2b5f8c libgcc_s.so.1`__register_frame_info_bases+0x30
 %npc = 0xff2b5f90 libgcc_s.so.1`__register_frame_info_bases+0x34
  %sp = 0xffbff540
  %fp = 0xffbff5b0

 %wim = 0x00000000
 %tbr = 0x00000000
> 0xff2b5f8c/i
libgcc_s.so.1`__register_frame_info_bases+0x30: st        %i2, [%i1 + 4]
>
baltrum#

Any ideas?

Thanks, Andreas.

-- 
Andreas Borchert, Universitaet Ulm, SAI, Helmholtzstr. 18, 89069 Ulm,  Germany
E-Mail: address@hidden
WWW:    http://www.mathematik.uni-ulm.de/sai/borchert/
PGP:    http://www.mathematik.uni-ulm.de/sai/borchert/pgp.html




reply via email to

[Prev in Thread] Current Thread [Next in Thread]