This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: collect2: ld terminated with signal 10 [Bus error]
- To: dave at hiauly1 dot hia dot nrc dot ca (John David Anglin)
- Subject: Re: collect2: ld terminated with signal 10 [Bus error]
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Sun, 25 Jun 2000 22:40:26 -0400 (EDT)
- Cc: gcc-bugs at gcc dot gnu dot org
> > collect2: ld terminated with signal 10 [Bus error]
> > /usr/ccs/bin/ld: Unsatisfied symbols:
> > bad_typeid virtual table(data)
> > __check_eh_spec (data)
> > __rtti_user (data)
>
> I looked at the assembler code used to build opnew.o in libgcc.a. It
> generates an undefined reference to __check_eh_spec (data). The problem
> is that ASM_OUTPUT_EXTERNAL is not being called for these functions. As
> a result, the normal .IMPORT stuff for these library routines is not there.
The problem is in mark_addressable. It sets TREE_USED for __check_null_eh_spec
and __check_eh_spec, preventing build_call from calling mark_used. Possibly,
fixing this problem will fix the problem for the others as well.
5002 TREE_USED (x) = 1;
(gdb) bt
#0 mark_addressable (exp=0x400b8200) at ../../../gcc/cp/typeck.c:5002
#1 0x31e6b8 in build_unary_op (code=ADDR_EXPR, xarg=0x400b8200, noconvert=0)
at ../../../gcc/cp/typeck.c:4739
#2 0x3157b0 in decay_conversion (exp=0x400b8200)
at ../../../gcc/cp/typeck.c:1793
#3 0x326008 in default_conversion (exp=0x40054880)
at ../../../gcc/cp/typeck.c:1803
#4 0x24ee00 in build_call (function=0x400b8200, parms=0x0)
at ../../../gcc/cp/call.c:355
#5 0x32b508 in expand_end_eh_spec (raises=0x40020580, try_block=0x400b1600)
at ../../../gcc/cp/except.c:773
#6 0x28b00c in finish_function (flags=1074496000)
at ../../../gcc/cp/decl.c:14444
#7 0x3041b4 in yyparse () at parse.y:2134
#8 0x58a68 in compile_file (name=0x40085fb0 "opnew.ii")
at ../../gcc/toplev.c:2289
#9 0x5dfac in main (argc=3, argv=0x7b03a6d8) at ../../gcc/toplev.c:4725
#10 0x7af1e6bc in ?? () from /usr/lib/libc.1
(gdb) p debug_tree(x)
<function_decl 400b8200 __check_null_eh_spec
type <function_type 40054880
type <void_type 4004cb80 void type_6 VOID
align 8 symtab 0 alias set -1
pointer_to_this <pointer_type 4004cc00 __builtin_va_list>>
DI
size <integer_cst 4004e000 constant 64>
unit size <integer_cst 4004e020 constant 8>
align 64 symtab 0 alias set -1
arg-types <tree_list 4004e880 unsigned value <void_type 4004cb80 void>>
pointer_to_this <pointer_type 400a4c80>>
volatile nothrow public in_system_header external SI file include/new line 42
(mem:SI (symbol_ref/v:SI ("@__check_null_eh_spec")) 0) chain <function_decl 400b8080 __cp_pop_exception>>
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)