This is the mail archive of the
gcc-patches@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: Thu, 29 Jun 2000 12:50:20 -0400 (EDT)
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
>
> With todays CVS and binutils 2.10.90, the following occurs executing the
> libio hounddog.exp under hppa1.1-hp-hpux10.20:
>
> Running ../../../../libio/testsuite/libio.tests/hounddog.exp ...
> Executing on host: /xxx/gnu/gcc-2.96/objdir/gcc/xgcc -B/xxx/gnu/gcc-2.96/objdir/gcc/ ../../../../libio/testsuite/../tests/hounddog.cc -O3 -I.. -I../../../../libio/testsuite/.. -nostdinc++ -I/xxx/gnu/gcc-2.96/libstdc++ -I/xxx/gnu/gcc-2.96/libstdc++/stl -L/xxx/gnu/gcc-2.96/objdir/hppa1.1-hp-hpux10.20/threads/libstdc++ -L/xxx/gnu/gcc-2.96/objdir/hppa1.1-hp-hpux10.20/threads/libiberty -L/xxx/gnu/gcc-2.96/objdir/hppa1.1-hp-hpux10.20/threads/libiberty -g -lstdc++ -liberty -lm -threads -o /xxx/gnu/gcc-2.96/objdir/hppa1.1-hp-hpux10.20/libio/testsuite/hounddog (timeout = 300)
> <command line>: warning: The C standard requires whitespace after #define __STDC_EXT__
> collect2: ld terminated with signal 10 [Bus error]
> /usr/ccs/bin/ld: Unsatisfied symbols:
> bad_typeid virtual table(data)
Here is a patch to fix the problem related the above unsatisfied symbol.
Under hpux, weak (sdef) data symbols need to be .EXPORT'd or else they
are local. The code in varasm.c implicitly assumes that weak symbols
are global.
With this patch, weak symbol support now works under hpux 10.20. Yeah!
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
2000-06-27 J. David Anglin <dave@hiauly1.hia.nrc.ca>
* pa/som.h (ASM_WEAKEN_LABEL): Export weak data symbols so that they
have global scope.
--- som.h.orig Tue Jun 27 12:57:31 2000
+++ som.h Tue Jun 27 13:14:04 2000
@@ -384,6 +384,14 @@
/* This is how we tell the assembler that a symbol is weak. */
#define ASM_WEAKEN_LABEL(FILE,NAME) \
- do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
- fputc ('\n', FILE); } while (0)
+ do { fputs ("\t.weak\t", FILE); \
+ assemble_name (FILE, NAME); \
+ fputc ('\n', FILE); \
+ if (! FUNCTION_NAME_P (NAME)) \
+ { \
+ fputs ("\t.EXPORT ", FILE); \
+ assemble_name (FILE, NAME); \
+ fputs (",DATA\n", FILE); \
+ } \
+ } while (0)
#endif