Home | History | Annotate | Download | only in linker

Lines Matching refs:soinfo

86 static LinkerAllocator<soinfo> g_soinfo_allocator;
87 static LinkerAllocator<LinkedListEntry<soinfo>> g_soinfo_links_allocator;
89 static soinfo* solist;
90 static soinfo* sonext;
91 static soinfo* somain; // main process, always the one after libdl_info
116 static soinfo* g_ld_preloads[LDPRELOAD_MAX + 1];
193 static void insert_soinfo_into_debug_map(soinfo* info) {
216 static void remove_soinfo_from_debug_map(soinfo* info) {
231 static void notify_gdb_of_load(soinfo* info) {
248 static void notify_gdb_of_unload(soinfo* info) {
272 LinkedListEntry<soinfo>* SoinfoListAllocator::alloc() {
276 void SoinfoListAllocator::free(LinkedListEntry<soinfo>* entry) {
285 static soinfo* soinfo_alloc(const char* name, struct stat* file_stat, off64_t file_offset) {
291 soinfo* si = new (g_soinfo_allocator.alloc()) soinfo(name, file_stat, file_offset);
296 TRACE("name %s: allocated soinfo @ %p", name, si);
300 static void soinfo_free(soinfo* si) {
309 soinfo *prev = nullptr, *trav;
311 TRACE("name %s: freeing soinfo @ %p", si->name, si);
388 for (soinfo* si = solist; si != 0; si = si->next) {
404 for (soinfo* si = solist; si != nullptr; si = si->next) {
418 static ElfW(Sym)* soinfo_elf_lookup(soinfo* si, unsigned hash, const char* name) {
455 soinfo::soinfo(const char* name, const struct stat* file_stat, off64_t file_offset) {
482 static ElfW(Sym)* soinfo_do_lookup(soinfo* si, const char* name, soinfo** lsi) {
547 si->get_children().visit([&](soinfo* child) {
612 static LoadTask* create(const char* name, soinfo* needed_by) {
621 soinfo* get_needed_by() const {
625 LoadTask(const char* name, soinfo* needed_by)
629 soinfo* needed_by_;
639 typedef linked_list_t<soinfo> SoinfoLinkedList;
645 // specified soinfo object and its dependencies in breadth first order.
646 ElfW(Sym)* dlsym_handle_lookup(soinfo* si, soinfo** found, const char* name) {
651 soinfo* current_soinfo;
665 current_soinfo->get_children().for_each([&](soinfo* child) {
676 specified soinfo (for RTLD_NEXT).
678 ElfW(Sym)* dlsym_linear_lookup(const char* name, soinfo** found, soinfo* start) {
686 for (soinfo* si = start; (s == nullptr) && (si != nullptr); si = si->next) {
702 soinfo* find_containing_library(const void* p) {
704 for (soinfo* si = solist; si != nullptr; si = si->next) {
712 ElfW(Sym)* dladdr_find_symbol(soinfo* si, const void* addr) {
769 static void for_each_dt_needed(const soinfo* si, F action) {
777 static soinfo* load_library(LoadTaskList& load_tasks, const char* name, int dlflags, const android_dlextinfo* extinfo) {
811 for (soinfo* si = solist; si != nullptr; si = si->next) {
817 TRACE("library \"%s\" is already loaded under different name/path \"%s\" - will return existing soinfo", name, si->name);
833 soinfo* si = soinfo_alloc(SEARCH_NAME(name), &file_stat, file_offset);
855 static soinfo *find_loaded_library_by_name(const char* name) {
857 for (soinfo* si = solist; si != nullptr; si = si->next) {
865 static soinfo* find_library_internal(LoadTaskList& load_tasks, const char* name, int dlflags, const android_dlextinfo* extinfo) {
867 soinfo* si = find_loaded_library_by_name(name);
879 static void soinfo_unload(soinfo* si);
881 static bool is_recursive(soinfo* si, soinfo* parent) {
891 return !parent->get_parents().visit([&](soinfo* grandparent) {
896 static bool find_libraries(const char* const library_names[], size_t library_names_size, soinfo* soinfos[],
897 soinfo* ld_preloads[], size_t ld_preloads_size, int dlflags, const android_dlextinfo* extinfo) {
923 soinfo* si = find_library_internal(load_tasks, task->get_name(), dlflags, extinfo);
928 soinfo* needed_by = task->get_needed_by();
952 soinfo* si;
968 static soinfo* find_library(const char* name, int dlflags, const android_dlextinfo* extinfo) {
974 soinfo* si;
983 static void soinfo_unload(soinfo* si) {
989 soinfo* child = nullptr;
996 TRACE("deprecated (old format of soinfo): %s needs to unload %s", si->name, library_name);
997 soinfo* needed = find_library(library_name, RTLD_NOLOAD, nullptr);
1041 soinfo* do_dlopen(const char* name, int flags, const android_dlextinfo* extinfo) {
1058 soinfo* si = find_library(name, flags, extinfo);
1066 void do_dlclose(soinfo* si) {
1082 int soinfo::Relocate(ElfW(Rela)* rela, unsigned count) {
1096 soinfo* lsi = nullptr;
1359 int soinfo::Relocate(ElfW(Rel)* rel, unsigned count) {
1374 soinfo* lsi = nullptr;
1564 static bool mips_relocate_got(soinfo* si) {
1596 soinfo* lsi = nullptr;
1617 void soinfo::CallArray(const char* array_name __unused, linker_function_t* functions, size_t count, bool reverse) {
1636 void soinfo::CallFunction(const char* function_name __unused, linker_function_t function) {
1650 void soinfo::CallPreInitConstructors() {
1656 void soinfo::CallConstructors() {
1667 // soinfo for libc_malloc_debug_leak.so.
1669 // called again with the libc soinfo. If it doesn't trigger the early-
1679 get_children().for_each([] (soinfo* si) {
1690 void soinfo::CallDestructors() {
1707 void soinfo::add_child(soinfo* child) {
1714 void soinfo::remove_all_links() {
1720 children.for_each([&] (soinfo* child) {
1721 child->parents.remove_if([&] (const soinfo* parent) {
1726 parents.for_each([&] (soinfo* parent) {
1727 parent->children.remove_if([&] (const soinfo* child) {
1737 dev_t soinfo::get_st_dev() {
1745 ino_t soinfo::get_st_ino() {
1753 off64_t soinfo::get_file_offset() {
1763 static soinfo::soinfo_list_t g_empty_list;
1765 soinfo::soinfo_list_t& soinfo::get_children() {
1773 soinfo::soinfo_list_t& soinfo::get_parents() {
1781 ElfW(Addr) soinfo::resolve_symbol_address(ElfW(Sym)* s) {
1789 const char* soinfo::get_string(ElfW(Word) index) const {
1858 bool soinfo::PrelinkImage() {
2175 bool soinfo::LinkImage(const android_dlextinfo* extinfo) {
2278 soinfo* si = soinfo_alloc("[vdso]", nullptr, 0);
2292 * This is linker soinfo for GDB. See details below.
2299 static soinfo linker_soinfo_for_gdb(LINKER_PATH, nullptr, 0);
2306 * be on the soinfo list.
2363 soinfo* si = soinfo_alloc(args.argv[0], nullptr, 0);
2436 soinfo* needed_library_si[needed_libraries_count];
2554 soinfo linker_so("[dynamic linker]", nullptr, 0);