Subject: ld error linking eBones. is this a current/ld botch?
To: None <port-i386@NetBSD.ORG>
From: George Michaelson <G.Michaelson@cc.uq.oz.au>
List: port-i386
Date: 01/11/1995 09:58:53
I've got most of eBones (Kerberos IV legally exported plus non-US
sourced DES) to compile, sys_errlist[] decls being almost the only code
change. However I'm now being hit by an ld botch.

Anybody able to suggest how I should clarify what is causing the
problem?  I have installed gcc-2.6.3 to see if the compiler output was
a problem (no different), and I'll be trying gas from the current
binutils release, but that version of ld won't make on NetBSD out-of-the-can.

Is there an outstanding buglet in ld or some known interaction with the
rest of the compile chain? The libs are having ld -x -r run over the .o
instances so there's lots of room for simplification of the make
sequences if thats worth trying.

NetBSD-1.0A, sup to 7th Jan, i386 Architecture.

screamer# make -n | sed -e 's/-g/-v -g/' | sh -x
+ cc -v -g -I.././include -I../util/ss -DBSD42 -DATHENA_COMPAT -DATHENA 
	-DKERBEROS -DVFS -DNDBM -o kadmin kadmin.o kadmin_cmds.o 
	.././util/ss/libss.a .././util/et/libcom_err.a 
	.././lib/kadm/libkadm.a .././lib/krb/libkrb.a 
	.././lib/des/libdes.a
gcc version 2.4.5
  ld -e start -dc -dp -o kadmin /usr/lib/crt0.o kadmin.o kadmin_cmds.o 
	.././util/ss/libss.a .././util/et/libcom_err.a 
	.././lib/kadm/libkadm.a .././lib/krb/libkrb.a 
	.././lib/des/libdes.a -lgcc -lc -lgcc
cc: Internal compiler error: program ld got fatal signal 11
screamer# 

screamer# gdb `which ld` ld.core 
Core was generated by `ld'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/libexec/ld.so...done.
Reading symbols from /usr/lib/libgnumalloc.so.0.0...done.
Reading symbols from /usr/lib/libc.so.12.0...done.
#0  consider_relocation (entry=0x170f8, dataseg=0) at ld.c:2068
2068                            sp = lsp->symbol;
(gdb) where
#0  consider_relocation (entry=0x170f8, dataseg=0) at ld.c:2068
#1  0x29b6 in each_full_file (function=0x4d38 <consider_relocation>, arg=0x0)
    at ld.c:915
#2  0x446e in digest_symbols () at ld.c:1663
#3  0x1b04 in main (argc=18, argv=0xf7bfda9c) at ld.c:384
(gdb) print lsp
$1 = (localsymbol_t *) 0x118
(gdb) print *lsp
Cannot access memory at address 0x118.