hp link errors, and xgcc core building libobjc

John David Anglin dave@hiauly1.hia.nrc.ca
Tue Jul 11 10:20:00 GMT 2000


Are you certain that you are linking with the newly built versions of
libgcc and libstdc++?  I fairly certain that the som.h patch fixed
the problem regarding the unsatisfied virtual tables and the typeck.c
patch unsatisfied code symbols.

You can examine libgcc.a with the HP "nm -p" command.  If you find
that the weak (sdef) symbols are not global (capitalized), then there is
a problem re the exporting of weak data symbols in your build.

If you compile code which calls, say __builtin_delete, you may find
there is no '.IMPORT' for it.  This is what the typeck.c patch was supposed
to fix.

Dave

> 
> Unfortunately, this didn't seem to help, or other errors I'm having are
> preventing it from working. In fact, it actually looks worse, though that
> could just be from other changes made elsewhere:
> 
>  /umr/testbin/../lib/gcc-lib/hppa2.0-hp-hpux10.20/2.96/collect2 -L/lib/pa1.1
> -L/usr/lib/pa1.1 -z -u main -o hello /usr/ccs/lib/crt0.o
> -L/umr/testbin/../lib/gcc-lib/hppa2.0-hp-hpux10.20/2.96
> -L/umr/testbin/../lib/gcc-lib
> -L/afs/umr.edu/software/egcs2/hpux10/lib/gcc-lib/hppa2.0-hp-hpux10.20/2.96
> -L/usr/ccs/bin -L/usr/ccs/lib -L/opt/langtools/lib
> -L/umr/testbin/../lib/gcc-lib/hppa2.0-hp-hpux10.20/2.96/../../..
> -L/afs/umr.edu/software/egcs2/hpux10/lib/gcc-lib/hppa2.0-hp-hpux10.20/2.96/.
> ./../.. hello.o -lstdc++ -lm -lgcc -lc -lgcc
> /usr/ccs/bin/ld: Unsatisfied symbols:
>    __builtin_delete (code)
>    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_cast virtual table(data)
>    bad_typeid::~bad_typeid(void)(code)
>    bad_cast type_info function(code)
>    filebuf virtual table(data)
>    ios type_info function(code)
>    exception type_info function(code)
>    exception virtual table(data)
>    bad_cast::~bad_cast(void)(code)
>    bad_typeid type_info function(code)
>    __builtin_vec_delete (code)
>    __builtin_vec_new (code)
>    __user_type_info type_info function(code)
> collect2: ld returned 1 exit status
> gmake: *** [all] Error 1
> 

The above list is pretty much what I saw before the patches.  They are
all due to problems with libgcc.a.

> 
> At the moment, I'm getting signal 11 errors in cc1obj compiling libobjc.
> Pretty much anything in there. 
 
I don't see this.  Possibly, it is because my source is from Friday or
I am using a 1.1 machine.

> Here's where it is core'ing: (I tried removing the -O2 and -g and -quiet to
> test, but it still cored.)
> 
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "hppa2.0-hp-hpux10.20"...
> (gdb) set args linking.mi -dumpbase linking.m -version -fgnu-runtime
> -lang-objc -o linking.s
> (gdb) run
> Starting program: /afs/umr.edu/software/egcs2/build.egcs/hpux10/gcc/cc1obj
> linking.mi -dumpbase linking.m -version -fgnu-runtime -lang-objc -o
> linking.s
> warning: Unable to find __d_pid symbol in object file.
> warning: Suggest linking with /opt/langtools/lib/end.o.
> warning: GDB will be unable to track shl_load/shl_unload calls
> GNU Obj-C version 2.96 20000711 (experimental) (hppa2.0-hp-hpux10.20)
> compiled by GNU C version 2.96 20000711 (experimental).
> options passed:  -fgnu-runtime -lang-objc
> options enabled:  -fpeephole -ffunction-cse -fkeep-static-consts
>  -freg-struct-return -fsched-interblock -fsched-spec -fnew-exceptions
>  -fsjlj-exceptions -fcommon -fargument-alias -fident -fmath-errno -msnake
>  -mpa-risc-1-1 -mjump-in-delay -mgas -mschedule=7100LC
> 
> Program received signal SIGSEGV, Segmentation fault.
> split_specs_attrs (specs_attrs=0x4008f0c0, declspecs=0x400099a4, 
>     prefix_attributes=0x400099a8)
>     at /afs/umr.edu/software/egcs2/src/gcc-latest/gcc/c-common.c:1133
> 1133              while (TREE_CHAIN (a) != NULL_TREE)

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


More information about the Gcc-bugs mailing list