void*
p4_dlopenext (const char* name)
{
int fd;
MODULE_ID lib = 0;
char libname[255];
if (! name) return NULL;
if (! p4_dlself ) p4_dlinit ();
strncpy (libname, name, 255);
strncat (libname, ".O" , 255);
fd = open (libname, O_RDONLY, 0);
if (fd != ERROR) {
P4_enter1("ld < '%s'" , libname);
lib = loadModule (fd, GLOBAL_SYMBOLS);
P4_leave1("ld done = %p" , lib);
close (fd);
}
return ((void*) lib);
} |