Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Dec 1996 18:21:46 +1030 (CST)
From:      Michael Smith <msmith@atrad.adelaide.edu.au>
To:        loewis@cs.tu-berlin.de (Martin v.Loewis)
Cc:        pgiffuni@fps.biblos.unal.edu.co, freebsd-emulation@FreeBSD.org
Subject:   Re: status of windows, dos and svr4 emulation
Message-ID:  <199612090751.SAA08541@genesis.atrad.adelaide.edu.au>
In-Reply-To: <199612070006.BAA02982@cent.cs.tu-berlin.de> from "Martin v.Loewis" at "Dec 7, 96 01:06:48 am"

next in thread | previous in thread | raw e-mail | index | archive | help
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  [[



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199612090751.SAA08541>