From owner-freebsd-current Wed Dec 20 1:43: 7 2000 From owner-freebsd-current@FreeBSD.ORG Wed Dec 20 01:43:05 2000 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from relay.nuxi.com (nuxi.cs.ucdavis.edu [169.237.7.38]) by hub.freebsd.org (Postfix) with ESMTP id 200C037B400 for ; Wed, 20 Dec 2000 01:43:04 -0800 (PST) Received: from dragon.nuxi.com (Ipittythefoolthattrustsident@trang.nuxi.com [209.152.133.57]) by relay.nuxi.com (8.9.3/8.9.3) with ESMTP id BAA12340; Wed, 20 Dec 2000 01:43:02 -0800 (PST) (envelope-from obrien@NUXI.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.11.1/8.11.1) id eBK9h0S42653; Wed, 20 Dec 2000 01:43:00 -0800 (PST) (envelope-from obrien) Date: Wed, 20 Dec 2000 01:42:59 -0800 From: "David O'Brien" To: Stephen McKay Cc: "Donald J . Maddox" , current@freebsd.org Subject: Re: Is compatibility for old aout binaries broken? Message-ID: <20001220014259.G41741@dragon.nuxi.com> Reply-To: obrien@freebsd.org References: <20001216161756.A6370@cae88-102-101.sc.rr.com> <200012171658.eBHGwGW24109@dungeon.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200012171658.eBHGwGW24109@dungeon.home>; from mckay@thehub.com.au on Mon, Dec 18, 2000 at 02:58:16AM +1000 X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Sender: obrien@NUXI.com Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, Dec 18, 2000 at 02:58:16AM +1000, Stephen McKay wrote: > This has been broken for new users for some time. :-( Those of us > upgrading from source have been immune to this problem, because we > retain the old a.out ld.so binary. > > >/usr/libexec/ld.so: Undefined symbol "___error" called from > >sim:/usr/X11R6/lib /aout/libX11.so.6.1 at 0x20160644 > > When errno became a function that returns a pointer (previously it was > a simple integer variable), recompiled libraries became incompatable with > old binaries. So, I hacked the a.out loader (ld.so). The fix was in 3.0. > Well, Nate called it a horrible hack, so maybe I should say "the hack was > in 3.0". src/lib/libc/sys/__error.c suggests this was the case for 2.2.7+. What is out of sync is the X11 a.out libs. They are probably built on a 2.2.7 or 2.2.8 box, thus they refer to `___error' vs. `errno'. These libs are wrong for the SimCity binary. They are a.out yes, but not proper for compat20 use. Since SimCity needs `libgcc.so.261', I'll assume it was built that long ago. The problem isn't as much ld.so, as it should match the libc.so, et.al. you are using from the compat2[01] dist (needed to satisfy ``ldd lib/SimCity/res/sim''). And `ld.so' and the shared libs would be consistent on the system the a.out program was built on. What I would feel most comfortable with, is doing a MFC to RELENG_2_2 of the rtld-aout changes since then, building a new `ld.so' and putting that in the compat2? dists. Problem is I don't have access to a 2.2-STABLE box. > I poked about with my old FreeBSD CD collection and found that > version 3.0 through 3.2 have a fully functioning (fully hack enabled) > ld.so, but an older binary has been substituted in 3.3 and onward, > including 4.0 and 4.1, and most likely 4.2 also. Are you sure? src/lib/compat/compat2[012]/ld.so.gz.uu are all at rev 1.1. So there has been no change to them over the lifetime of their existence. All three are identical -- having the same MD5 checksum. Well, looking at the release tags compat22/ld.so was in 3.2. compat2[01]/ld.so was added for 3.3. > I can only guess that some anonymous release engineer (nobody we know :-) > picked the wrong CD at some point to get the master copy of ld.so once > it stopped compiling. (Or at least stopped being easily compiled.) Not quite. I seem to remember that JKH was makeing a tarball of a.out libs from what ever was on his box at the time (thus probably the last a.out ld.so just before E-day on 3-CURRENT). When I committed the compat2? bits, I took ld.so from a 2.2.x release as this is the compat2? dist, not compat3.aout dist. Which is what you're suggesting should have been done. -- -- David (obrien@FreeBSD.org) GNU is Not Unix / Linux Is Not UniX To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message