Subject: Re: dlopen in init functions
To: =?iso-8859-1?Q?Jarom=EDr_Dole=E8ek?= <dolecek@ibis.cz>
From: None <erh@nimenees.com>
List: tech-toolchain
Date: 06/29/2000 10:47:06
On Thu, Jun 29, 2000 at 08:55:43AM +0200, Jaromír Doleček wrote:
> erh@nimenees.com wrote:
> > Since I haven't heard anything about this I assume the problem
> > still exists. True? However, the test case doesn't appear to be there.
>
> IIRC the problem has been already solved in -current (and hence upcoming 1.5).
> I don't recall which exact change it was, just that it was committed
> by Christos Zoulas.
Would this have been in the last week or two? I just tried a
test case and it failed: h3 ends up being null, but handle is just fine.
#include <stdio.h>
#include <errno.h>
#include <dlfcn.h>
void *call_dlopen()
{
void *d;
d = dlopen ("libz.so", DL_LAZY);
return(d);
}
static void *handle = call_dlopen();
static void *h3 = dlopen ("libmenu.so", DL_LAZY);
int main () {
printf("%x\n", handle);
printf("%x\n", h3);
printf("%x\n", dlopen("libacl.so", DL_LAZY));
}
eric