Subject: Re: dl* functions on ELF platforms
To: None <tshiozak@astec.co.jp, tv@pobox.com>
From: Noriyuki Soda <soda@sra.co.jp>
List: tech-toolchain
Date: 03/01/2000 02:42:48
> : > > Does anyone know why dl* functions are resident in crt0 in
> : > > the current implementation?
> : > Because the functions are needed to actually load libc.so ?
> : 
> : No, these "function interfaces" are not used to load libc.so.
> 
> Specifically, ld.so (ELF and a.out) has the actual implementations.  Since
> programs do not link to ld.so, there are indirection symbols in crt0.

That does describe the reason why dl* symbols are included in crt0.
But doesn't describe the reason why dl* symbol definitions cannot be 
moved from crt0 to libc.

Please re-read original description of the problem:
http://mail-index.netbsd.org/tech-userlevel/2000/02/23/0000.html

As the orignal mail describes, currently libc functions cannot call
dlopen(3) and related functions on ELF platforms.
Please note that locale(3) implementation have to call dl*(3)
functions (like commercial UNIXes).

What is the best way to solve this problem?
--
soda