Date: Fri, 24 Feb 95 14:51:56 GMT From: richard@cogsci.edinburgh.ac.uk To: freebsd-hackers@freefall.cdrom.com Subject: Binary compatibility with NetBSD Message-ID: <20708.9502241451@macbeth.cogsci.ed.ac.uk>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20708.9502241451>