Subject: Re: dlopen(0, 1) should work?
To: Jason Thorpe <thorpej@nas.nasa.gov>
From: Simon J. Gerraty <sjg@quick.com.au>
List: current-users
Date: 03/03/1998 14:12:10
> Basically, because it needs to wrap a bunch of syscalls to handle
> async IO, it wants to get a handle for libc.so and then get the
> address of read,write etc in that shared object.
> 
> I think that one could be achieved by just using dlsym(0,...).

Doh! no it can't.  dlsym(0, "_pipe") returned the address of the 
wrapper fucntion - resulting in recursion until out of stack.

	dlopen("libc.so", RTLD_LAZY); 

works, and I assume it returns a pointer to the already mapped libc?