Home
last modified time | relevance | path

Searched refs:phdr (Results 1 – 12 of 12) sorted by relevance

/bionic/linker/
Dlinker_phdr.cpp384 const ElfW(Phdr)* phdr = &phdr_table_[i]; in ReadDynamicSection()
385 if (phdr->p_type == PT_DYNAMIC) { in ReadDynamicSection()
386 pt_dynamic_offset = phdr->p_offset; in ReadDynamicSection()
387 pt_dynamic_filesz = phdr->p_filesz; in ReadDynamicSection()
490 const ElfW(Phdr)* phdr = &phdr_table[i]; in phdr_table_get_load_size()
492 if (phdr->p_type != PT_LOAD) { in phdr_table_get_load_size()
497 if (phdr->p_vaddr < min_vaddr) { in phdr_table_get_load_size()
498 min_vaddr = phdr->p_vaddr; in phdr_table_get_load_size()
501 if (phdr->p_vaddr + phdr->p_memsz > max_vaddr) { in phdr_table_get_load_size()
502 max_vaddr = phdr->p_vaddr + phdr->p_memsz; in phdr_table_get_load_size()
[all …]
Dlinker_main.cpp165 si->phdr = reinterpret_cast<ElfW(Phdr)*>(reinterpret_cast<char*>(ehdr_vdso) + ehdr_vdso->e_phoff); in add_vdso()
168 si->size = phdr_table_get_load_size(si->phdr, si->phnum); in add_vdso()
188 phdr_table_get_dynamic_section(info.phdr, info.phnum, info.load_bias, &map.l_ld, nullptr); in init_link_map_head()
196 const ElfW(Phdr)* phdr;
232 result.phdr = reinterpret_cast<const ElfW(Phdr)*>(getauxval(AT_PHDR)); in get_executable_info()
294 result.phdr = elf_reader.loaded_phdr(); in load_executable()
356 si->phdr = exe_info.phdr; 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()
374 const char *interp = phdr_table_get_interpreter_name(somain->phdr, somain->phnum, in linker_main()
[all …]
Dlinker.cpp410 dl_info.dlpi_phdr = si->phdr; in do_dl_iterate_phdr()
605 si_->phdr = elf_reader.loaded_phdr(); in load()
828 const ElfW(Phdr)* phdr = &si->phdr[i]; in find_containing_library()
829 if (phdr->p_type != PT_LOAD) { in find_containing_library()
832 if (vaddr >= phdr->p_vaddr && vaddr < phdr->p_vaddr + phdr->p_memsz) { in find_containing_library()
1759 __libc_shared_globals()->load_hook(si->load_bias, si->phdr, si->phnum); in find_libraries()
1901 __libc_shared_globals()->unload_hook(si->load_bias, si->phdr, si->phnum); in soinfo_unload_impl()
2775 phdr_table_get_dynamic_section(phdr, phnum, load_bias, &dynamic, &dynamic_flags); in prelink_image()
2796 (void) phdr_table_get_arm_exidx(phdr, phnum, load_bias, in prelink_image()
2801 if (__bionic_get_tls_segment(phdr, phnum, load_bias, &tls_segment)) { in prelink_image()
[all …]
Ddlfcn.cpp318 __libdl_info->phdr = linker_si.phdr; in get_libdl_info()
Dlinker_relocate.cpp187 if (phdr_table_protect_segments(relocator.si->phdr, relocator.si->phnum, in process_relocation_impl()
197 if (phdr_table_unprotect_segments(relocator.si->phdr, relocator.si->phnum, in process_relocation_impl()
Dlinker_soinfo.h163 const ElfW(Phdr)* phdr;
/bionic/tests/
Dlink_test.cpp65 const ElfW(Phdr)* phdr = reinterpret_cast<const ElfW(Phdr)*>(&info->dlpi_phdr[i]); in TEST()
66 if (phdr->p_type == PT_LOAD) { in TEST()
68 phdr->p_vaddr); in TEST()
136 static ElfW(Addr) find_exe_load_bias(const ProgHdr& phdr) { in find_exe_load_bias() argument
137 for (size_t i = 0; i < phdr.size; ++i) { in find_exe_load_bias()
138 if (phdr.table[i].p_type == PT_PHDR) { in find_exe_load_bias()
139 return reinterpret_cast<ElfW(Addr)>(phdr.table) - phdr.table[i].p_vaddr; in find_exe_load_bias()
146 static ElfW(Dyn)* find_dynamic(const ProgHdr& phdr, ElfW(Addr) load_bias) { in ElfW()
147 for (size_t i = 0; i < phdr.size; ++i) { in ElfW()
148 if (phdr.table[i].p_type == PT_DYNAMIC) { in ElfW()
[all …]
/bionic/libc/malloc_debug/
DMapData.cpp115 ElfW(Phdr) phdr; in read_loadbias() local
116 if (!get_val<ElfW(Word)>(entry, addr + offsetof(ElfW(Phdr), p_type), &phdr.p_type)) { in read_loadbias()
119 if (!get_val<ElfW(Off)>(entry, addr + offsetof(ElfW(Phdr), p_offset), &phdr.p_offset)) { in read_loadbias()
122 if (phdr.p_type == PT_LOAD && phdr.p_offset == entry->offset) { in read_loadbias()
123 if (!get_val<ElfW(Addr)>(entry, addr + offsetof(ElfW(Phdr), p_vaddr), &phdr.p_vaddr)) { in read_loadbias()
126 entry->load_bias = phdr.p_vaddr; in read_loadbias()
129 addr += sizeof(phdr); in read_loadbias()
/bionic/libc/bionic/
Dlibc_init_static.cpp118 for (ElfW(Phdr)* phdr = phdr_start; phdr < (phdr_start + phdr_ct); phdr++) { in apply_gnu_relro()
119 if (phdr->p_type != PT_GNU_RELRO) { in apply_gnu_relro()
123 ElfW(Addr) seg_page_start = PAGE_START(phdr->p_vaddr); in apply_gnu_relro()
124 ElfW(Addr) seg_page_end = PAGE_END(phdr->p_vaddr + phdr->p_memsz); in apply_gnu_relro()
Dbionic_elf_tls.cpp59 const ElfW(Phdr)& phdr = phdr_table[i]; in __bionic_get_tls_segment()
60 if (phdr.p_type == PT_TLS) { in __bionic_get_tls_segment()
62 phdr.p_memsz, in __bionic_get_tls_segment()
63 phdr.p_align, in __bionic_get_tls_segment()
64 reinterpret_cast<void*>(load_bias + phdr.p_vaddr), in __bionic_get_tls_segment()
65 phdr.p_filesz, in __bionic_get_tls_segment()
Dlibc_init_dynamic.cpp68 const ElfW(Phdr)* phdr,
71 const ElfW(Phdr)* phdr,
/bionic/libc/private/
Dbionic_globals.h97 void (*load_hook)(ElfW(Addr) base, const ElfW(Phdr)* phdr, ElfW(Half) phnum) = nullptr;
98 void (*unload_hook)(ElfW(Addr) base, const ElfW(Phdr)* phdr, ElfW(Half) phnum) = nullptr;