• Home
  • Raw
  • Download

Lines Matching refs:name

129 #define HOODLUM(name, ret, ...)                                               \  argument
130 ret name __VA_ARGS__ \
132 char errstr[] = "ERROR: " #name " called from the dynamic linker!\n"; \
175 map->l_name = (char*) info->name; in insert_soinfo_into_debug_map()
254 static soinfo *alloc_info(const char *name) in alloc_info() argument
258 if(strlen(name) >= SOINFO_NAME_LEN) { in alloc_info()
259 DL_ERR("%5d library name %s too long", pid, name); in alloc_info()
268 DL_ERR("%5d too many libraries when loading %s", pid, name); in alloc_info()
280 strlcpy((char*) si->name, name, sizeof(si->name)); in alloc_info()
286 TRACE("%5d name %s: allocated soinfo @ %p\n", pid, name, si); in alloc_info()
294 TRACE("%5d name %s: freeing soinfo @ %p\n", pid, si->name, si); in free_info()
303 DL_ERR("%5d name %s is not in solist!", pid, si->name); in free_info()
331 return si->name; in addr_to_name()
392 static Elf32_Sym *_elf_lookup(soinfo *si, unsigned hash, const char *name) in _elf_lookup() argument
400 name, si->name, si->base, hash, hash % si->nbucket); in _elf_lookup()
405 if(strcmp(strtab + s->st_name, name)) continue; in _elf_lookup()
415 name, si->name, s->st_value, s->st_size); in _elf_lookup()
425 const unsigned char *name = (const unsigned char *) _name; in elfhash() local
428 while(*name) { in elfhash()
429 h = (h << 4) + *name++; in elfhash()
438 _do_lookup(soinfo *si, const char *name, unsigned *base) in _do_lookup() argument
440 unsigned elf_hash = elfhash(name); in _do_lookup()
455 s = _elf_lookup(si, elf_hash, name); in _do_lookup()
462 s = _elf_lookup(lsi, elf_hash, name); in _do_lookup()
472 pid, si->name); in _do_lookup()
477 pid, si->name, name, lsi->name); in _do_lookup()
478 s = _elf_lookup(lsi, elf_hash, name); in _do_lookup()
492 pid, si->name, name, lsi->name); in _do_lookup()
493 s = _elf_lookup(lsi, elf_hash, name); in _do_lookup()
501 pid, si->name, name, s->st_value, lsi->name, lsi->base); in _do_lookup()
512 Elf32_Sym *lookup_in_library(soinfo *si, const char *name) in lookup_in_library() argument
514 return _elf_lookup(si, elfhash(name), name); in lookup_in_library()
519 Elf32_Sym *lookup(const char *name, soinfo **found, soinfo *start) in lookup() argument
521 unsigned elf_hash = elfhash(name); in lookup()
533 s = _elf_lookup(si, elf_hash, name); in lookup()
542 "si->base = 0x%08x\n", pid, name, s->st_value, si->base); in lookup()
604 static int _open_lib(const char *name) in _open_lib() argument
609 if ((stat(name, &filestat) >= 0) && S_ISREG(filestat.st_mode)) { in _open_lib()
610 if ((fd = open(name, O_RDONLY)) >= 0) in _open_lib()
617 static int open_library(const char *name) in open_library() argument
624 TRACE("[ %5d opening %s ]\n", pid, name); in open_library()
626 if(name == 0) return -1; in open_library()
627 if(strlen(name) > 256) return -1; in open_library()
629 if ((name[0] == '/') && ((fd = _open_lib(name)) >= 0)) in open_library()
633 n = format_buffer(buf, sizeof(buf), "%s/%s", *path, name); in open_library()
635 WARN("Ignoring very long library path: %s/%s\n", *path, name); in open_library()
642 n = format_buffer(buf, sizeof(buf), "%s/%s", *path, name); in open_library()
644 WARN("Ignoring very long library path: %s/%s\n", *path, name); in open_library()
666 is_prelinked(int fd, const char *name) in is_prelinked() argument
678 WARN("Could not read prelink_info_t structure for `%s`\n", name); in is_prelinked()
683 WARN("`%s` is not a prelinked library\n", name); in is_prelinked()
700 verify_elf_object(void *base, const char *name) in verify_elf_object() argument
737 get_lib_extents(int fd, const char *name, void *__hdr, unsigned *total_sz) in get_lib_extents() argument
747 TRACE("[ %5d Computing extents for '%s'. ]\n", pid, name); in get_lib_extents()
748 if (verify_elf_object(_hdr, name) < 0) { in get_lib_extents()
749 DL_ERR("%5d - %s is not a valid ELF object", pid, name); in get_lib_extents()
753 req_base = (unsigned) is_prelinked(fd, name); in get_lib_extents()
758 pid, name, req_base); in get_lib_extents()
760 TRACE("[ %5d - Non-prelinked library '%s' found. ]\n", pid, name); in get_lib_extents()
777 DL_ERR("%5d - No loadable segments found in %s.", pid, name); in get_lib_extents()
815 pid, (si->base ? "" : "non-"), si->name, si->base, in reserve_mem_region()
821 si->name, (unsigned)base, si->base); in reserve_mem_region()
844 pid, si->name, in alloc_mem_region()
850 pid, si->name, si->base); in alloc_mem_region()
855 pid, si->name); in alloc_mem_region()
895 pid, si->name, (unsigned)si->base); in load_segments()
907 "(0x%08x). p_vaddr=0x%08x p_offset=0x%08x ]\n", pid, si->name, in load_segments()
914 "p_vaddr=0x%08x p_offset=0x%08x", pid, si->name, in load_segments()
956 "(0x%08x) ]\n", pid, si->name, (unsigned)tmp, extra_len); in load_segments()
970 " (0x%08x) ]", pid, si->name, (unsigned)tmp, in load_segments()
978 "(0x%08x)\n", pid, si->name, (unsigned)extra_base, in load_segments()
986 "(0x%08x). p_vaddr=0x%08x p_offset=0x%08x\n", pid, si->name, in load_segments()
1024 pid, total_sz, si->name, si->size); in load_segments()
1029 "Total memory footprint: 0x%08x bytes ]\n", pid, si->name, in load_segments()
1051 get_wr_offset(int fd, const char *name, Elf32_Ehdr *ehdr)
1063 "not be able to determine write-protect offset.\n", pid, name);
1080 load_library(const char *name) in load_library() argument
1082 int fd = open_library(name); in load_library()
1091 DL_ERR("Library '%s' not found", name); in load_library()
1109 req_base = get_lib_extents(fd, name, &__header[0], &ext_sz); in load_library()
1112 TRACE("[ %5d - '%s' (%s) wants base=0x%08x sz=0x%08x ]\n", pid, name, in load_library()
1120 bname = strrchr(name, '/'); in load_library()
1121 si = alloc_info(bname ? bname + 1 : name); in load_library()
1136 pid, name, (void *)si->base, (unsigned) ext_sz); in load_library()
1167 pid, si->base, si->size, si->name); in init_library()
1180 soinfo *find_library(const char *name) in find_library() argument
1186 if (name == NULL) in find_library()
1189 if (name == NULL) in find_library()
1193 bname = strrchr(name, '/'); in find_library()
1194 bname = bname ? bname + 1 : name; in find_library()
1197 if(!strcmp(bname, si->name)) { in find_library()
1203 DL_ERR("OOPS: %5d recursive link to '%s'", pid, si->name); in find_library()
1208 TRACE("[ %5d '%s' has not been loaded yet. Locating...]\n", pid, name); in find_library()
1209 si = load_library(name); in find_library()
1224 TRACE("%5d unloading '%s'\n", pid, si->name); in unload_library()
1233 si->name, lsi->name); in unload_library()
1238 pid, si->name); in unload_library()
1250 pid, si->name, si->refcount); in unload_library()
1276 si->name, idx); in reloc_library()
1479 si->name, idx); in reloc_library_a()
1497 "handle this yet", pid, si->name, s->st_shndx, in reloc_library_a()
1598 si->name); in call_constructors()
1600 TRACE("[ %5d Done calling preinit_array for '%s' ]\n", pid, si->name); in call_constructors()
1604 " This is INVALID.", pid, si->name, in call_constructors()
1611 (unsigned)si->init_func, si->name); in call_constructors()
1613 TRACE("[ %5d Done calling init_func for '%s' ]\n", pid, si->name); in call_constructors()
1618 (unsigned)si->init_array, si->init_array_count, si->name); in call_constructors()
1620 TRACE("[ %5d Done calling init_array for '%s' ]\n", pid, si->name); in call_constructors()
1629 (unsigned)si->fini_array, si->fini_array_count, si->name); in call_destructors()
1631 TRACE("[ %5d Done calling fini_array for '%s' ]\n", pid, si->name); in call_destructors()
1636 (unsigned)si->fini_func, si->name); in call_destructors()
1638 TRACE("[ %5d Done calling fini_func for '%s' ]\n", pid, si->name); in call_destructors()
1718 INFO("[ %5d linking %s ]\n", pid, si->name); in link_image()
1774 pid, si->name, si->base + phdr->p_vaddr, in link_image()
1861 pid, si->name, si->init_func); in link_image()
1866 pid, si->name, si->fini_func); in link_image()
1871 pid, si->name, si->init_array); in link_image()
1879 pid, si->name, si->fini_array); in link_image()
1887 pid, si->name, si->preinit_array); in link_image()
1921 pid, ldpreload_names[i], si->name, tmp_err_buf); in link_image()
1931 DEBUG("%5d %s needs %s\n", pid, si->name, si->strtab + d[1]); in link_image()
1936 pid, si->strtab + d[1], si->name, tmp_err_buf); in link_image()
1952 DEBUG("[ %5d relocating %s plt ]\n", pid, si->name ); in link_image()
1957 DEBUG("[ %5d relocating %s ]\n", pid, si->name ); in link_image()
1964 DEBUG("[ %5d relocating %s plt ]\n", pid, si->name ); in link_image()
1969 DEBUG("[ %5d relocating %s ]\n", pid, si->name ); in link_image()
1976 DEBUG("[ %5d finished linking %s ]\n", pid, si->name); in link_image()
2017 ERROR("failed to link %s\n", si->name); in link_image()
2165 strlcpy((char*) linker_soinfo.name, "/system/bin/linker", sizeof linker_soinfo.name); in __linker_init()
2251 TRACE("[ %5d Ready to execute '%s' @ 0x%08x ]\n", pid, si->name, in __linker_init()