/bionic/linker/ |
D | linker_phdr.cpp | 396 const ElfW(Phdr)* phdr = &phdr_table_[i]; in ReadDynamicSection() 397 if (phdr->p_type == PT_DYNAMIC) { in ReadDynamicSection() 398 pt_dynamic_offset = phdr->p_offset; in ReadDynamicSection() 399 pt_dynamic_filesz = phdr->p_filesz; in ReadDynamicSection() 502 const ElfW(Phdr)* phdr = &phdr_table[i]; in phdr_table_get_load_size() 504 if (phdr->p_type != PT_LOAD) { in phdr_table_get_load_size() 509 if (phdr->p_vaddr < min_vaddr) { in phdr_table_get_load_size() 510 min_vaddr = phdr->p_vaddr; in phdr_table_get_load_size() 513 if (phdr->p_vaddr + phdr->p_memsz > max_vaddr) { in phdr_table_get_load_size() 514 max_vaddr = phdr->p_vaddr + phdr->p_memsz; in phdr_table_get_load_size() [all …]
|
D | linker_note_gnu_property.cpp | 40 : GnuPropertySection(si->phdr, si->phnum, si->load_bias, si->get_realpath()) {} in GnuPropertySection() 42 GnuPropertySection::GnuPropertySection(const ElfW(Phdr)* phdr, size_t phdr_count, in GnuPropertySection() argument 45 auto note_gnu_property = FindSegment(phdr, phdr_count, load_bias, name); in GnuPropertySection() 53 const ElfW(NhdrGNUProperty)* GnuPropertySection::FindSegment(const ElfW(Phdr)* phdr, in ElfW() 59 if (phdr != nullptr) { in ElfW() 61 if (phdr[i].p_type != PT_GNU_PROPERTY) { in ElfW() 68 if (phdr[i].p_memsz < sizeof(ElfW(NhdrGNUProperty))) { in ElfW() 72 name, static_cast<size_t>(phdr[i].p_memsz), sizeof(ElfW(NhdrGNUProperty))); in ElfW() 78 auto note_nhdr = reinterpret_cast<ElfW(NhdrGNUProperty)*>(load_bias + phdr[i].p_vaddr); in ElfW() 81 if ((phdr[i].p_memsz - sizeof(ElfW(NhdrGNUProperty))) < note_nhdr->nhdr.n_descsz) { in ElfW() [all …]
|
D | linker_main.cpp | 168 si->phdr = reinterpret_cast<ElfW(Phdr)*>(reinterpret_cast<char*>(ehdr_vdso) + ehdr_vdso->e_phoff); in add_vdso() 171 si->size = phdr_table_get_load_size(si->phdr, si->phnum); in add_vdso() 191 phdr_table_get_dynamic_section(info.phdr, info.phnum, info.load_bias, &map.l_ld, nullptr); in init_link_map_head() 199 const ElfW(Phdr)* phdr; 235 result.phdr = reinterpret_cast<const ElfW(Phdr)*>(getauxval(AT_PHDR)); in get_executable_info() 297 result.phdr = elf_reader.loaded_phdr(); in load_executable() 369 si->phdr = exe_info.phdr; in linker_main() 371 get_elf_base_from_phdr(si->phdr, si->phnum, &si->base, &si->load_bias); in linker_main() 372 si->size = phdr_table_get_load_size(si->phdr, si->phnum); in linker_main() 387 const char *interp = phdr_table_get_interpreter_name(somain->phdr, somain->phnum, in linker_main() [all …]
|
D | linker_note_gnu_property.h | 79 GnuPropertySection(const ElfW(Phdr)* phdr, size_t phdr_count, const ElfW(Addr) load_bias, 87 const ElfW(NhdrGNUProperty)* FindSegment(const ElfW(Phdr)* phdr, size_t phdr_count,
|
D | dlfcn.cpp | 318 __libdl_info->phdr = linker_si.phdr; in get_libdl_info()
|
D | linker_relocate.cpp | 187 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()
|
D | linker_soinfo.h | 163 const ElfW(Phdr)* phdr;
|
/bionic/libc/malloc_debug/ |
D | MapData.cpp | 115 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(Word)>(entry, addr + offsetof(ElfW(Phdr), p_flags), &phdr.p_flags)) { in read_loadbias() 122 if (!get_val<ElfW(Off)>(entry, addr + offsetof(ElfW(Phdr), p_offset), &phdr.p_offset)) { in read_loadbias() 125 if ((phdr.p_type == PT_LOAD) && (phdr.p_flags & PF_X) ) { in read_loadbias() 126 if (!get_val<ElfW(Addr)>(entry, addr + offsetof(ElfW(Phdr), p_vaddr), &phdr.p_vaddr)) { in read_loadbias() 129 entry->load_bias = phdr.p_vaddr - phdr.p_offset; in read_loadbias() 132 addr += sizeof(phdr); in read_loadbias()
|
/bionic/tests/ |
D | link_test.cpp | 65 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/bionic/ |
D | libc_init_static.cpp | 123 for (ElfW(Phdr)* phdr = phdr_start; phdr < (phdr_start + phdr_ct); phdr++) { in apply_gnu_relro() 124 if (phdr->p_type != PT_GNU_RELRO) { in apply_gnu_relro() 128 ElfW(Addr) seg_page_start = PAGE_START(phdr->p_vaddr); in apply_gnu_relro() 129 ElfW(Addr) seg_page_end = PAGE_END(phdr->p_vaddr + phdr->p_memsz); in apply_gnu_relro() 209 const ElfW(Phdr)* phdr = &phdr_start[i]; in __get_memtag_note() 210 if (phdr->p_type != PT_NOTE) { in __get_memtag_note() 213 ElfW(Addr) p = load_bias + phdr->p_vaddr; in __get_memtag_note() 214 ElfW(Addr) note_end = load_bias + phdr->p_vaddr + phdr->p_memsz; in __get_memtag_note()
|
D | libc_init_dynamic.cpp | 69 const ElfW(Phdr)* phdr, 72 const ElfW(Phdr)* phdr,
|
D | bionic_elf_tls.cpp | 60 const ElfW(Phdr)& phdr = phdr_table[i]; in __bionic_get_tls_segment() 61 if (phdr.p_type == PT_TLS) { in __bionic_get_tls_segment() 63 phdr.p_memsz, in __bionic_get_tls_segment() 64 phdr.p_align, in __bionic_get_tls_segment() 65 reinterpret_cast<void*>(load_bias + phdr.p_vaddr), in __bionic_get_tls_segment() 66 phdr.p_filesz, in __bionic_get_tls_segment()
|
/bionic/libc/private/ |
D | bionic_globals.h | 99 void (*load_hook)(ElfW(Addr) base, const ElfW(Phdr)* phdr, ElfW(Half) phnum) = nullptr; 100 void (*unload_hook)(ElfW(Addr) base, const ElfW(Phdr)* phdr, ElfW(Half) phnum) = nullptr;
|