libstdc++/4236: Unresolved symbols problem (sparc solaris differs from hppa hp-ux)
dalle@iar.se
dalle@iar.se
Wed Sep 5 04:06:00 GMT 2001
>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 <strstream>
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:
More information about the Gcc-bugs
mailing list