vtables local on HP-PA -> even libstdc++ does not link

Marco Franzen marcof@thyron.com
Fri Oct 27 09:39:00 GMT 2000


gcc_ss_20001023 cannot link a trivial program against its libstdc++ on the HP-PA.

#include <iostream>
int main() { cout << "Hello world\n"; return 0; }

links as follows

GNU C++ version 2.97 20001023 (experimental) (hppa1.1-hp-hpux10.20) compiled by GNU C version 2.97 20001023 (experimental).
 /usr/gnu/src/gcc/cvs/install/gcc_ss_20001023/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.97/../../../../hppa1.1-hp-hpux10.20/bin/as -o world.o world.s
 /usr/gnu/src/gcc/cvs/install/gcc_ss_20001023/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.97/collect2 -L/lib/pa1.1 -L/usr/lib/pa1.1 -z -u main -o world /usr/ccs/lib/crt0.o -L/usr/gnu/src/gcc/cvs/install/gcc_ss_20001023/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.97 -L/usr/ccs/bin -L/usr/ccs/lib -L/opt/langtools/lib -L/usr/gnu/src/gcc/cvs/install/gcc_ss_20001023/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.97/../../.. world.o -lstdc++ -lm -lgcc -lc -lgcc
/usr/ccs/bin/ld: Unsatisfied symbols:
   bad_typeid virtual table(data)
   ios virtual table(data)
   type_info type_info function(code)
   stdiobuf virtual table(data)
   type_info virtual table(data)
   bad_alloc::~bad_alloc(void)(code)
   bad_cast virtual table(data)
   bad_typeid::~bad_typeid(void)(code)
   bad_cast type_info function(code)
   filebuf virtual table(data)
   bad_alloc type_info function(code)
   ios type_info function(code)
   bad_alloc virtual table(data)
   exception type_info function(code)
   exception virtual table(data)
   bad_cast::~bad_cast(void)(code)
   bad_typeid type_info function(code)
   __user_type_info type_info function(code)
collect2: ld returned 1 exit status

I picked stdiobuf virtual table and looked for vt.*stdiobuf in the output of nm run on the library.
There are only two occurrences:

stdiostream.o:
[...]
40000030 d _vt$8stdiobuf

and
stdstrbufs.o:
[...]
         U _vt$8stdiobuf

Note the lower case of the `d' in the former (GNU nm with no further options).
In 2.95.2 objects, virtual tables show an upper case `D' in the nm output.

I tried one earlier snapshot, with the same result.
Two snapshots earlier it did not even bootstrap.
I haven't tried going further back (apart from an attempt many months ago).

I am using the released binutils-2.10 for gas (plus installed patch
< http://sources.redhat.com/ml/binutils/2000-09/msg00263.html >)
and GNU sed 3.02 instead of the broken HP one.
(Without GNU as it still does not bootstrap due to the colon in `gcc2_compiled.:',
as reported in March as the second issue in
< http://gcc.gnu.org/ml/gcc-bugs/2000-03/msg01236.html >.)

Any idea? Maybe Jeff again?

Thanks a lot,

Marco
-----------------------------------------------------------------
This email is confidential and intended solely for the use of the
individual to whom it is addressed.
Any views or opinions presented are solely those of the author
and do not necessarily represent those of Thyron Limited.
If you are not the intended recipient then please be advised
that you have received this email in error and that any use,
dissemination, forwarding, printing or copying of this email
is strictly prohibited.
If you have received this email in error, please notify the
Thyron IT Administrator on +44 (0)1923 236 050 or
send an email to mail-admin@thyron.com.
Thank You


More information about the Gcc-bugs mailing list