Subject: Weirdness in ld/collect2 in -current
To: None <port-vax@netbsd.org>
From: Tom Ivar Helbekkmo <tih@kpnQwest.no>
List: port-vax
Date: 04/07/2001 21:38:13
Look at this:
$ uname -a
NetBSD varg.i.eunet.no 1.5T NetBSD 1.5T (VARG) #4: Thu Apr 5 23:38:04 CEST 2001
root@varg.i.eunet.no:/usr/src/sys/arch/vax/compile/VARG vax
$ cat > foo.c
int main (int argc, char **argv) { readline(); }
$ cc -o foo foo.c
/tmp/ccFTO4Mu.o: Undefined symbol `_readline'referenced from text
segment
collect2: ld returned 1 exit status
$ cc -o foo foo.c -ledit
$ echo $?
0
$ ./foo
/usr/libexec/ld.so: Undefined symbol "_tputs"in foo:/usr/lib/libedit.so.2.5
$ echo $?
1
$ ldd foo
foo:
-ledit.2 => /usr/lib/libedit.so.2.5 (0x181b000)
-lc.12 => /usr/lib/libc.so.12.74 (0x182d000)
$
Surely, this can't be right? The linkage loader should have failed it?
-tih
--
The basic difference is this: hackers build things, crackers break them.