Subject: Re: dl* functions on ELF platforms
To: None <tech-toolchain@netbsd.org, tech-userlevel@netbsd.org>
From: T.SHIOZAKI <tshiozak@astec.co.jp>
List: tech-userlevel
Date: 03/02/2000 15:53:48
From: "Kevin P. Neal" <kpneal@pobox.com>
Subject: Re:  dl* functions on ELF platforms
Date: Wed, 1 Mar 2000 20:30:29 -0500
Message-ID: <20000301203029.A27692@tome.neutralgood.org>

> Quick question:
> Would these functions be available in both the static and dynamic
> versions of libc?

"ld" still can resolve dl* symbols even with static libc,
but it will fail at runtime since ld.so will not be linked.
Sure, it is significant to provide independent libdl to force linker
to mark executable "dynamically linked".  There is good cause for
you saying so.  However, it seems rare case to require libdl.
It seems a matter of taste for me whether operating system helps
in such case.  On the other hand, we should not link libdl
to executable explicitly except for such case.
(Of course, we can though provide libdl as dl* functions can be used
without most awareness.)

Instead, if you frequently wish to use dl* functions with statically
linked libc, you can prepare "empty" libdl.so into /usr/lib.
It is not wrong as the local elusion, although libdl should
of course not be "emply" if operating system will provide libdl.

Since it seems not much difference for me whether provide libdl or not,
I will not oppose even if you will provide the libdl as far as keeping
consistency with the current implementation of NetBSD.
However, we will be able to do it even after my last patch is accepted.

--
Takuya SHIOZAKI / ASTEC Products, Inc.