Lines Matching refs:lib
36 os_library_init(struct library *lib) in os_library_init() argument
42 os_library_destroy(struct library *lib) in os_library_destroy() argument
47 os_library_clone(struct library *retp, struct library *lib) in os_library_clone() argument
55 arch_library_init(struct library *lib) in arch_library_init() argument
61 arch_library_destroy(struct library *lib) in arch_library_destroy() argument
66 arch_library_clone(struct library *retp, struct library *lib) in arch_library_clone() argument
155 libsym->lib = NULL; in private_library_symbol_init()
278 private_library_init(struct library *lib, enum library_type type) in private_library_init() argument
280 lib->next = NULL; in private_library_init()
282 lib->key = 0; in private_library_init()
283 lib->base = 0; in private_library_init()
284 lib->entry = 0; in private_library_init()
285 lib->dyn_addr = 0; in private_library_init()
286 lib->protolib = NULL; in private_library_init()
288 lib->soname = NULL; in private_library_init()
289 lib->own_soname = 0; in private_library_init()
291 lib->pathname = NULL; in private_library_init()
292 lib->own_pathname = 0; in private_library_init()
294 lib->symbols = NULL; in private_library_init()
295 lib->exported_names = NULL; in private_library_init()
296 lib->type = type; in private_library_init()
300 library_init(struct library *lib, enum library_type type) in library_init() argument
302 private_library_init(lib, type); in library_init()
304 if (os_library_init(lib) < 0) in library_init()
307 if (arch_library_init(lib) < 0) { in library_init()
308 os_library_destroy(lib); in library_init()
328 library_clone(struct library *retp, struct library *lib) in library_clone() argument
335 if (strdup_if(&soname, lib->soname, lib->own_soname) < 0 in library_clone()
336 || strdup_if(&pathname, lib->pathname, lib->own_pathname) < 0) { in library_clone()
337 if (lib->own_soname) in library_clone()
342 private_library_init(retp, lib->type); in library_clone()
343 library_set_soname(retp, soname, lib->own_soname); in library_clone()
344 library_set_pathname(retp, pathname, lib->own_pathname); in library_clone()
346 retp->key = lib->key; in library_clone()
352 for (it = lib->symbols; it != NULL; it = it->next) { in library_clone()
364 (*nsymp)->lib = retp; in library_clone()
374 for (it = lib->exported_names; it != NULL; it = it->next) { in library_clone()
386 if (os_library_clone(retp, lib) < 0) in library_clone()
389 if (arch_library_clone(retp, lib) < 0) { in library_clone()
398 library_destroy(struct library *lib) in library_destroy() argument
400 if (lib == NULL) in library_destroy()
403 arch_library_destroy(lib); in library_destroy()
404 os_library_destroy(lib); in library_destroy()
406 library_set_soname(lib, NULL, 0); in library_destroy()
407 library_set_pathname(lib, NULL, 0); in library_destroy()
410 for (sym = lib->symbols; sym != NULL; ) { in library_destroy()
419 for (it = lib->exported_names; it != NULL; ) { in library_destroy()
429 library_set_soname(struct library *lib, const char *new_name, int own_name) in library_set_soname() argument
431 if (lib->own_soname) in library_set_soname()
432 free((char *)lib->soname); in library_set_soname()
433 lib->soname = new_name; in library_set_soname()
434 lib->own_soname = own_name; in library_set_soname()
438 library_set_pathname(struct library *lib, const char *new_name, int own_name) in library_set_pathname() argument
440 if (lib->own_pathname) in library_set_pathname()
441 free((char *)lib->pathname); in library_set_pathname()
442 lib->pathname = new_name; in library_set_pathname()
443 lib->own_pathname = own_name; in library_set_pathname()
447 library_each_symbol(struct library *lib, struct library_symbol *start_after, in library_each_symbol() argument
451 struct library_symbol *it = start_after == NULL ? lib->symbols in library_each_symbol()
473 library_add_symbol(struct library *lib, struct library_symbol *first) in library_add_symbol() argument
477 last->lib = lib; in library_add_symbol()
485 last->next = lib->symbols; in library_add_symbol()
486 lib->symbols = first; in library_add_symbol()
490 library_named_cb(struct process *proc, struct library *lib, void *name) in library_named_cb() argument
492 if (name == lib->soname in library_named_cb()
493 || strcmp(lib->soname, (char *)name) == 0) in library_named_cb()
500 library_with_key_cb(struct process *proc, struct library *lib, void *keyp) in library_with_key_cb() argument
502 return lib->key == *(arch_addr_t *)keyp ? CBS_STOP : CBS_CONT; in library_with_key_cb()