Lines Matching refs:name
108 #define HOODLUM(name, ret, ...) \ argument
109 ret name __VA_ARGS__ \
111 char errstr[] = "ERROR: " #name " called from the dynamic linker!\n"; \
154 map->l_name = (char*) info->name; in insert_soinfo_into_debug_map()
232 static soinfo *alloc_info(const char *name) in alloc_info() argument
236 if(strlen(name) >= SOINFO_NAME_LEN) { in alloc_info()
237 DL_ERR("%5d library name %s too long", pid, name); in alloc_info()
246 DL_ERR("%5d too many libraries when loading %s", pid, name); in alloc_info()
258 strcpy((char*) si->name, name); in alloc_info()
265 TRACE("%5d name %s: allocated soinfo @ %p\n", pid, name, si); in alloc_info()
273 TRACE("%5d name %s: freeing soinfo @ %p\n", pid, si->name, si); in free_info()
282 DL_ERR("%5d name %s is not in solist!", pid, si->name); in free_info()
310 return si->name; in addr_to_name()
371 static Elf32_Sym *_elf_lookup(soinfo *si, unsigned hash, const char *name) in _elf_lookup() argument
379 name, si->name, si->base, hash, hash % si->nbucket); in _elf_lookup()
384 if(strcmp(strtab + s->st_name, name)) continue; in _elf_lookup()
394 name, si->name, s->st_value, s->st_size); in _elf_lookup()
404 const unsigned char *name = (const unsigned char *) _name; in elfhash() local
407 while(*name) { in elfhash()
408 h = (h << 4) + *name++; in elfhash()
417 _do_lookup_in_so(soinfo *si, const char *name, unsigned *elf_hash) in _do_lookup_in_so() argument
420 *elf_hash = elfhash(name); in _do_lookup_in_so()
421 return _elf_lookup (si, *elf_hash, name); in _do_lookup_in_so()
425 Elf32_Sym *lookup_in_library(soinfo *si, const char *name) in lookup_in_library() argument
428 return _do_lookup_in_so(si, name, &unused); in lookup_in_library()
432 _do_lookup(soinfo *user_si, const char *name, unsigned *base) in _do_lookup() argument
442 s = _do_lookup_in_so(user_si, name, &elf_hash); in _do_lookup()
451 s = _do_lookup_in_so(si, name, &elf_hash); in _do_lookup()
460 "si->base = 0x%08x\n", pid, name, s->st_value, si->base); in _do_lookup()
468 Elf32_Sym *lookup(const char *name, unsigned *base) in lookup() argument
470 return _do_lookup(NULL, name, base); in lookup()
494 static int _open_lib(const char *name) in _open_lib() argument
499 if ((stat(name, &filestat) >= 0) && S_ISREG(filestat.st_mode)) { in _open_lib()
500 if ((fd = open(name, O_RDONLY)) >= 0) in _open_lib()
507 static int open_library(const char *name) in open_library() argument
514 TRACE("[ %5d opening %s ]\n", pid, name); in open_library()
516 if(name == 0) return -1; in open_library()
517 if(strlen(name) > 256) return -1; in open_library()
519 if ((name[0] == '/') && ((fd = _open_lib(name)) >= 0)) in open_library()
523 n = snprintf(buf, sizeof(buf), "%s/%s", *path, name); in open_library()
525 WARN("Ignoring very long library path: %s/%s\n", *path, name); in open_library()
532 n = snprintf(buf, sizeof(buf), "%s/%s", *path, name); in open_library()
534 WARN("Ignoring very long library path: %s/%s\n", *path, name); in open_library()
556 is_prelinked(int fd, const char *name) in is_prelinked() argument
568 WARN("Could not read prelink_info_t structure for `%s`\n", name); in is_prelinked()
573 WARN("`%s` is not a prelinked library\n", name); in is_prelinked()
590 verify_elf_object(void *base, const char *name) in verify_elf_object() argument
627 get_lib_extents(int fd, const char *name, void *__hdr, unsigned *total_sz) in get_lib_extents() argument
637 TRACE("[ %5d Computing extents for '%s'. ]\n", pid, name); in get_lib_extents()
638 if (verify_elf_object(_hdr, name) < 0) { in get_lib_extents()
639 DL_ERR("%5d - %s is not a valid ELF object", pid, name); in get_lib_extents()
643 req_base = (unsigned) is_prelinked(fd, name); in get_lib_extents()
648 pid, name, req_base); in get_lib_extents()
650 TRACE("[ %5d - Non-prelinked library '%s' found. ]\n", pid, name); in get_lib_extents()
667 DL_ERR("%5d - No loadable segments found in %s.", pid, name); in get_lib_extents()
705 pid, (si->base ? "" : "non-"), si->name, si->base, in reserve_mem_region()
711 si->name, (unsigned)base, si->base); in reserve_mem_region()
736 pid, si->name, si->base, si->ba_index); in alloc_mem_region()
748 pid, si->name); in alloc_mem_region()
788 pid, si->name, (unsigned)si->base); in load_segments()
800 "(0x%08x). p_vaddr=0x%08x p_offset=0x%08x ]\n", pid, si->name, in load_segments()
807 "p_vaddr=0x%08x p_offset=0x%08x", pid, si->name, in load_segments()
849 "(0x%08x) ]\n", pid, si->name, (unsigned)tmp, extra_len); in load_segments()
863 " (0x%08x) ]", pid, si->name, (unsigned)tmp, in load_segments()
871 "(0x%08x)\n", pid, si->name, (unsigned)extra_base, in load_segments()
879 "(0x%08x). p_vaddr=0x%08x p_offset=0x%08x\n", pid, si->name, in load_segments()
917 pid, total_sz, si->name, si->size); in load_segments()
922 "Total memory footprint: 0x%08x bytes ]\n", pid, si->name, in load_segments()
944 get_wr_offset(int fd, const char *name, Elf32_Ehdr *ehdr)
956 "not be able to determine write-protect offset.\n", pid, name);
973 load_library(const char *name) in load_library() argument
975 int fd = open_library(name); in load_library()
984 DL_ERR("Library '%s' not found", name); in load_library()
1002 req_base = get_lib_extents(fd, name, &__header[0], &ext_sz); in load_library()
1005 TRACE("[ %5d - '%s' (%s) wants base=0x%08x sz=0x%08x ]\n", pid, name, in load_library()
1013 bname = strrchr(name, '/'); in load_library()
1014 si = alloc_info(bname ? bname + 1 : name); in load_library()
1029 pid, name, (void *)si->base, (unsigned) ext_sz); in load_library()
1064 pid, si->base, si->size, si->name); in init_library()
1080 soinfo *find_library(const char *name) in find_library() argument
1083 const char *bname = strrchr(name, '/'); in find_library()
1084 bname = bname ? bname + 1 : name; in find_library()
1087 if(!strcmp(bname, si->name)) { in find_library()
1090 DL_ERR("OOPS: %5d recursive link to '%s'", pid, si->name); in find_library()
1095 TRACE("[ %5d '%s' has not been loaded yet. Locating...]\n", pid, name); in find_library()
1096 si = load_library(name); in find_library()
1111 TRACE("%5d unloading '%s'\n", pid, si->name); in unload_library()
1117 si->name, si->strtab + d[1]); in unload_library()
1131 pid, si->name, si->base); in unload_library()
1141 pid, si->name, si->refcount); in unload_library()
1167 si->name, idx); in reloc_library()
1185 "handle this yet", pid, si->name, s->st_shndx, in reloc_library()
1339 si->name); in call_constructors()
1341 TRACE("[ %5d Done calling preinit_array for '%s' ]\n", pid, si->name); in call_constructors()
1345 " This is INVALID.", pid, si->name, in call_constructors()
1352 (unsigned)si->init_func, si->name); in call_constructors()
1354 TRACE("[ %5d Done calling init_func for '%s' ]\n", pid, si->name); in call_constructors()
1359 (unsigned)si->init_array, si->init_array_count, si->name); in call_constructors()
1361 TRACE("[ %5d Done calling init_array for '%s' ]\n", pid, si->name); in call_constructors()
1370 (unsigned)si->fini_array, si->fini_array_count, si->name); in call_destructors()
1372 TRACE("[ %5d Done calling fini_array for '%s' ]\n", pid, si->name); in call_destructors()
1377 (unsigned)si->fini_func, si->name); in call_destructors()
1379 TRACE("[ %5d Done calling fini_func for '%s' ]\n", pid, si->name); in call_destructors()
1459 INFO("[ %5d linking %s ]\n", pid, si->name); in link_image()
1515 pid, si->name, si->base + phdr->p_vaddr, in link_image()
1580 pid, si->name, si->init_func); in link_image()
1585 pid, si->name, si->fini_func); in link_image()
1590 pid, si->name, si->init_array); in link_image()
1598 pid, si->name, si->fini_array); in link_image()
1606 pid, si->name, si->preinit_array); in link_image()
1633 DEBUG("%5d %s needs %s\n", pid, si->name, si->strtab + d[1]); in link_image()
1638 pid, si->strtab + d[1], si->name, tmp_err_buf); in link_image()
1646 DEBUG("[ %5d relocating %s plt ]\n", pid, si->name ); in link_image()
1651 DEBUG("[ %5d relocating %s ]\n", pid, si->name ); in link_image()
1657 DEBUG("[ %5d finished linking %s ]\n", pid, si->name); in link_image()
1698 ERROR("failed to link %s\n", si->name); in link_image()
1807 strcpy((char*) linker_soinfo.name, "/system/bin/linker"); in __linker_init()
1882 TRACE("[ %5d Ready to execute '%s' @ 0x%08x ]\n", pid, si->name, in __linker_init()