From mboxrd@z Thu Jan 1 00:00:00 1970 From: dalle@iar.se To: gcc-gnats@gcc.gnu.org Subject: libstdc++/4236: Unresolved symbols problem (sparc solaris differs from hppa hp-ux) Date: Wed, 05 Sep 2001 04:06:00 -0000 Message-id: <20010905105944.28424.qmail@sourceware.cygnus.com> X-SW-Source: 2001-09/msg00104.html List-Id: >Number: 4236 >Category: libstdc++ >Synopsis: Unresolved symbols problem (sparc solaris differs from hppa hp-ux) >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Wed Sep 05 04:06:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Jan-Erik Dahlin >Release: gcc-3.0.1 >Organization: >Environment: hppa hp-ux 10.20 sparc solaris8 >Description: #include class inherit_from_ostrstream : public std::ostrstream { }; main() { inherit_from_ostrstream junk; } When the program above compiles fine on both platforms, but it will only link under solaris. On the hp I get: blakkur:~/iar/GCC3 >g++ bug.c collect2: ld terminated with signal 10 [Bus error] /usr/ccs/bin/ld: Unsatisfied symbols: virtual thunk to std::ostrstream::~ostrstream()(data) virtual thunk to std::ostrstream::~ostrstream()(data) And it turns out the thunk in the library is static: blakkur:~/iar/GCC3 >nm /usr/local/lib/libstdc++.a | grep _ZTv0_n12_NSt10ostrstreamD0Ev _ZTv0_n12_NSt10ostrstreamD0Ev| 0|static|entry |$CODE$ But on solaris the symbol has weak linkage: kveikur:~/iar/GCC3 >nm /usr/local/lib/libstdc++.a | grep _ZTv0_n12_NSt10ostrstreamD0Ev [254] | 0| 32|FUNC |WEAK |0 |63 |_ZTv0_n12_NSt10ostrstreamD0Ev >How-To-Repeat: Compile included program. >Fix: >Release-Note: >Audit-Trail: >Unformatted: