Lines Matching refs:dll

29 static const char id[] = "\n@(#)$Id: dll library (AT&T Research) 2010-10-20 $\0\n";
69 void* dll;
75 if (!(dll = (void*)shl_load(path, mode, 0L)))
77 return dll;
80 extern int dlclose(void* dll)
85 extern void* dlsym(void* dll, const char* name)
90 handle = dll == (void*)&all ? (shl_t)0 : (shl_t)dll;
135 void* dll;
137 if (!(dll = (void*)load((char*)path, mode, getenv("LIBPATH"))))
139 return dll;
142 extern int dlclose(void* dll)
273 # include <dll.h>
279 void* dll;
282 if (!(dll = (void*)dllload(path)))
284 return dll;
287 extern int dlclose(void* dll)
365 Dll_t* dll;
382 dll = &global;
383 else if (!(dll = newof(0, Dll_t, 1, strlen(path))))
393 dll->module = NSLinkModule(image, path, (mode & RTLD_LAZY) ? 0 : NSLINKMODULE_OPTION_BINDNOW);
395 if (!dll->module)
397 free(dll);
402 dll->image = NSAddImage(path, 0);
403 if (!dll->image)
405 free(dll);
410 free(dll);
413 strcpy(dll->path, path);
414 dll->magic = DL_MAGIC;
416 return (void*)dll;
421 Dll_t* dll = (Dll_t*)handle;
423 if (!dll || dll == DL_NEXT || dll->magic != DL_MAGIC)
428 if (dll->module)
429 NSUnLinkModule(dll->module, 0);
430 free(dll);
435 lookup(Dll_t* dll, const char* name)
440 if (dll == DL_NEXT)
446 else if (dll->module)
447 address = NSLookupSymbolInModule(dll->module, name);
448 else if (dll->image)
450 if (!NSIsSymbolNameDefinedInImage(dll->image, name))
452 address = NSLookupSymbolInImage(dll->image, name, 0);
467 Dll_t* dll = (Dll_t*)handle;
471 if (!dll || dll != DL_NEXT && (dll->magic != DL_MAGIC || !dll->image && !dll->module))
476 if (!(address = lookup(dll, name)) && name[0] != '_' && strlen(name) < (sizeof(buf) - 1))
480 address = lookup(dll, buf);
484 dlmessage = dll == DL_NEXT ? e_cover : e_undefined;
512 extern int dlclose(void* dll)