From owner-freebsd-emulation Sun Dec 8 23:53:23 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id XAA14933 for emulation-outgoing; Sun, 8 Dec 1996 23:53:23 -0800 (PST) Received: from genesis.atrad.adelaide.edu.au (genesis.atrad.adelaide.edu.au [129.127.96.120]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id XAA14920 for ; Sun, 8 Dec 1996 23:53:19 -0800 (PST) Received: (from msmith@localhost) by genesis.atrad.adelaide.edu.au (8.8.2/8.7.3) id SAA08541; Mon, 9 Dec 1996 18:21:47 +1030 (CST) From: Michael Smith Message-Id: <199612090751.SAA08541@genesis.atrad.adelaide.edu.au> Subject: Re: status of windows, dos and svr4 emulation In-Reply-To: <199612070006.BAA02982@cent.cs.tu-berlin.de> from "Martin v.Loewis" at "Dec 7, 96 01:06:48 am" To: loewis@cs.tu-berlin.de (Martin v.Loewis) Date: Mon, 9 Dec 1996 18:21:46 +1030 (CST) Cc: pgiffuni@fps.biblos.unal.edu.co, freebsd-emulation@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-emulation@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk Martin v.Loewis stands accused of saying: > > Out of curiosity, can somebody explain (or point me to) what exactly makes > the FreeBSD a.out superior to similar formats found on other systems? > Specifically, I'd like to know the following things: > - How does it deal with relocation in shared libraries? Does it require > the shared libraries to be at a fixed address? If not, does it relocate > the image? If so, is the sharing among different processes preserved? > If not, how does it deal with global variables being at different places? Try 'man link' and 'man ld.so' for the answers to these and other questions. The 'a.out' format is 'adequate' rather than 'superior'. There are good reasons to consider ELF for the future, but there is not the pressing need that drove the Linux community in that direction. > - Does it support libdl? I.e. can new objects be loaded after > program started? If you mean "are the dl* family of functions supported", the answer is Yes. Try 'man dlopen'. > - How does it do versioning? Is there a concept of major and minor versions? Yes. > If a program requests a version, what library versions would be offered? The exact match if possible, then other versions with the same major. > Is the location of the library stored in the image? No. > How does it deal with interdependecies between shared images? I.e. suppose > I have libfoo.1, libfoo.2 and libbar.1. libbar.1 depends on libfoo.1, and > libfoo.1 and libfoo.2 are mutually incompatible. Can I build new programs > so that they get linked with libfoo.2, unless I also need to link with > libbar.1? If so, do I need to specify this requirement to the linker? The linker will always link against the most recent version of a library. In your situation the correct answer would be "update libbar" 8) You could also achieve your desired result by putting libfoo.1 in a seperate directory and explicitly referencing it in the linker invocation. If you had an application that was linked against libbar.1 and libfoo.1, it would run correctly on a system with libbar.1, libfoo.1 and libfoo.2 all installed. > Martin Hopefully that answers at least some of your questions. -- ]] Mike Smith, Software Engineer msmith@gsoft.com.au [[ ]] Genesis Software genesis@gsoft.com.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control. (ph) +61-8-8267-3493 [[ ]] Unix hardware collector. "Where are your PEZ?" The Tick [[