Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jan 1997 15:41:08 -0500 (EST)
From:      Chuck Robey <chuckr@glue.umd.edu>
To:        Terry Lambert <terry@lambert.org>
Cc:        John Polstra <jdp@polstra.com>, mark@grondar.za, peter@FreeBSD.ORG, current@FreeBSD.ORG
Subject:   Re: Static binaries and dlopen(3) with a new crypt(3) lib.
Message-ID:  <Pine.OSF.3.95.970120154002.1998B-100000@ginger.eng.umd.edu>
In-Reply-To: <199701201904.MAA15840@phaeton.artisoft.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 20 Jan 1997, Terry Lambert wrote:

> > The change Peter made was that dlopen() and related functions no
> > longer come up undefined under static linking.  But they're just
> > stubs, and they always return an error.
> > 
> > It's hard to support dlopen() under static linking, because the
> > dynamic linker isn't even present in the address space.  It's not
> > impossible, just nontrivial.  I've been meaning to look into it
> > for a while.  Maybe this will get me moving.
> 
> For ELF, if you are planning to do this, I believe the large gap
> prior to the mapping location of the user code (the base to which
> it is linked) was intentioanlly left there so that the image
> loader could map the ld.so into the process address space.
> 
> Effectively, this means that other than a "constructor" style
> data reference, ld.so should be usable, demand-paged, in all address
> spaces, and the crt0.o should be the same for dynamic vs. static
> linking (assuming the construction of library interfaces takes
> place in a linker set in the C case as well as the C++ case).
> 
> In general, this means adding the symbol references for dynamic
> relocation of dlopen, et. al., as part of the crt0.o ... effectively,
> always "dynamic linking" them into the process address space.
> 
> We can discuss this in detail offline, if what I've said isn't
> clear (I suspect it is, since you're a known "compiler-head" 8-)).

The main idea of statically linked stuff is to allow it to work in the
absence of /usr.  This sounds like it's getting close to breaking that,
no?

----------------------------+-----------------------------------------------
Chuck Robey                 | Interests include any kind of voice or data 
chuckr@eng.umd.edu          | communications topic, C programming, and Unix.
9120 Edmonston Ct #302      |
Greenbelt, MD 20770         | I run Journey2 and picnic, both FreeBSD
(301) 220-2114              | version 3.0 current -- and great FUN!
----------------------------+-----------------------------------------------




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.3.95.970120154002.1998B-100000>