From owner-freebsd-hackers Fri Feb 24 12:11:12 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id MAA23639 for hackers-outgoing; Fri, 24 Feb 1995 12:11:12 -0800 Received: from sun2.nsfnet-relay.ac.uk (sun2.nsfnet-relay.ac.uk [128.86.8.45]) by freefall.cdrom.com (8.6.9/8.6.6) with SMTP id MAA23627 for ; Fri, 24 Feb 1995 12:11:02 -0800 From: richard@cogsci.edinburgh.ac.uk Via: uk.ac.edinburgh.cogsci; Fri, 24 Feb 1995 15:10:31 +0000 Date: Fri, 24 Feb 95 14:51:56 GMT Message-Id: <20708.9502241451@macbeth.cogsci.ed.ac.uk> To: freebsd-hackers@freefall.cdrom.com Subject: Binary compatibility with NetBSD Sender: hackers-owner@FreeBSD.org Precedence: bulk I've only recently joined this mailing list, so perhaps this has been discussed before. It seems to me that a serious failing of FreeBSD is its inability to execute all NetBSD binaries, and vice versa. It seems remarkable that we can execute system V binaries but not other BSD ones! The problem of course is shared libraries. As far as I know, at the system call level the systems are almost completely compatible (and if they aren't, they should be). But there's nothing official to distinguish whether a program uses FreeBSD or NetBSD shared libraries. What we need is: - agreement with the NetBSD people on some way for ld.so to distinguish between binaries. I don't think this needs a change to the a.out format; maybe the version argument passed from crt0 to ld.so could be used. - an ld.so that can be mapped in by both systems' crt0s (at present it appears that FreeBSD's crt0 will map NetBSD's ld.so, but NetBSD's crt0 reports "Bad magic" for FreeBSD's ld.so. - an ld.so that will map in libraries from a different directory if it detects that it's running on the "wrong" system. I suspect that in fact it is already possible to devise a hack for ld.so to tell which system a binary was linked on, perhaps by inspecting the crt0 code, and that this would let us run existing NetBSD binaries. Can someone who understands the shared library mechanism better comment on this? -- Richard