Lines Matching refs:si
67 static void set_bss_vma_name(soinfo* si);
80 void solist_add_soinfo(soinfo* si) { in solist_add_soinfo() argument
81 sonext->next = si; in solist_add_soinfo()
82 sonext = si; in solist_add_soinfo()
85 bool solist_remove_soinfo(soinfo* si) { in solist_remove_soinfo() argument
88 if (trav == si) { in solist_remove_soinfo()
96 PRINT("name \"%s\"@%p is not in solist!", si->get_realpath(), si); in solist_remove_soinfo()
103 prev->next = si->next; in solist_remove_soinfo()
104 if (si == sonext) { in solist_remove_soinfo()
163 soinfo* si = soinfo_alloc(&g_default_namespace, "[vdso]", nullptr, 0, 0); in add_vdso() local
165 si->phdr = reinterpret_cast<ElfW(Phdr)*>(reinterpret_cast<char*>(ehdr_vdso) + ehdr_vdso->e_phoff); in add_vdso()
166 si->phnum = ehdr_vdso->e_phnum; in add_vdso()
167 si->base = reinterpret_cast<ElfW(Addr)>(ehdr_vdso); in add_vdso()
168 si->size = phdr_table_get_load_size(si->phdr, si->phnum); in add_vdso()
169 si->load_bias = get_elf_exec_load_bias(ehdr_vdso); in add_vdso()
171 si->prelink_image(); in add_vdso()
172 si->link_image(SymbolLookupList(si), si, nullptr, nullptr); in add_vdso()
174 si->set_dt_flags_1(si->get_dt_flags_1() | DF_1_NODELETE); in add_vdso()
175 si->set_linked(); in add_vdso()
176 si->call_constructors(); in add_vdso()
178 vdso = si; in add_vdso()
352 soinfo* si = soinfo_alloc(&g_default_namespace, in linker_main() local
355 somain = si; in linker_main()
356 si->phdr = exe_info.phdr; in linker_main()
357 si->phnum = exe_info.phdr_count; in linker_main()
358 get_elf_base_from_phdr(si->phdr, si->phnum, &si->base, &si->load_bias); in linker_main()
359 si->size = phdr_table_get_load_size(si->phdr, si->phnum); in linker_main()
360 si->dynamic = nullptr; in linker_main()
361 si->set_main_executable(); in linker_main()
362 init_link_map_head(*si); in linker_main()
364 set_bss_vma_name(si); in linker_main()
393 insert_link_map_into_debug_map(&si->link_map_head); in linker_main()
398 ElfW(Ehdr)* elf_hdr = reinterpret_cast<ElfW(Ehdr)*>(si->base); in linker_main()
422 if (!si->prelink_image()) __linker_cannot_link(g_argv[0]); in linker_main()
425 si->set_dt_flags_1(si->get_dt_flags_1() | DF_1_GLOBAL); in linker_main()
445 for_each_dt_needed(si, [&](const char* name) { in linker_main()
454 si, in linker_main()
466 if (!si->link_image(SymbolLookupList(si), si, nullptr, nullptr)) { in linker_main()
469 si->increment_ref_count(); in linker_main()
477 si->call_pre_init_constructors(); in linker_main()
478 si->call_constructors(); in linker_main()
500 TRACE("[ Ready to execute \"%s\" @ %p ]", si->get_realpath(), reinterpret_cast<void*>(entry)); in linker_main()
550 static void set_bss_vma_name(soinfo* si) { in set_bss_vma_name() argument
551 for (size_t i = 0; i < si->phnum; ++i) { in set_bss_vma_name()
552 auto phdr = &si->phdr[i]; in set_bss_vma_name()
558 ElfW(Addr) seg_start = phdr->p_vaddr + si->load_bias; in set_bss_vma_name()