From owner-freebsd-current Tue Aug 8 04:54:45 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id EAA24114 for current-outgoing; Tue, 8 Aug 1995 04:54:45 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.cdrom.com (8.6.11/8.6.6) with ESMTP id EAA24077 for ; Tue, 8 Aug 1995 04:54:32 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id VAA06057; Tue, 8 Aug 1995 21:48:14 +1000 Date: Tue, 8 Aug 1995 21:48:14 +1000 From: Bruce Evans Message-Id: <199508081148.VAA06057@godzilla.zeta.org.au> To: asami@cs.berkeley.edu, bde@zeta.org.au Subject: Re: "ld: /usr/lib/crt0.o: Undefined error: 0" problem solved Cc: current@freebsd.org Sender: current-owner@freebsd.org Precedence: bulk > * >>> cc -o hexrand hexrand.c <&- > * >ld: /usr/lib/crt0.o: Undefined error: 0 > * >======= > * > * Untested fix: >Sorry, I tried the patch but it still fails with the same error.... :< Apparently the author of ld didn't understand U*ix error codes :-). There are are at least 2 more cases (one in ld.c, one more in lib.c where there is a bogus check check for `fd > 0'). Perhaps ld supports writing to stdout (this should have been the default) so it is an error for stdout to be closed. ld could detect the problem early and open descriptor 0 to /dev/null if it doesn't really care. Bruce