Lines Matching refs:phdr

384     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()
640 const ElfW(Phdr)* phdr = &phdr_table_[i]; in LoadSegments()
642 if (phdr->p_type != PT_LOAD) { in LoadSegments()
647 ElfW(Addr) seg_start = phdr->p_vaddr + load_bias_; in LoadSegments()
648 ElfW(Addr) seg_end = seg_start + phdr->p_memsz; in LoadSegments()
653 ElfW(Addr) seg_file_end = seg_start + phdr->p_filesz; in LoadSegments()
656 ElfW(Addr) file_start = phdr->p_offset; in LoadSegments()
657 ElfW(Addr) file_end = file_start + phdr->p_filesz; in LoadSegments()
670 name_.c_str(), i, reinterpret_cast<void*>(phdr->p_offset), in LoadSegments()
671 reinterpret_cast<void*>(phdr->p_filesz), in LoadSegments()
677 int prot = PFLAGS_TO_PROT(phdr->p_flags); in LoadSegments()
705 if ((phdr->p_flags & PF_W) != 0 && PAGE_OFFSET(seg_file_end) > 0) { in LoadSegments()
719 PFLAGS_TO_PROT(phdr->p_flags), in LoadSegments()
740 const ElfW(Phdr)* phdr = phdr_table; in _phdr_table_set_load_prot()
741 const ElfW(Phdr)* phdr_limit = phdr + phdr_count; in _phdr_table_set_load_prot()
743 for (; phdr < phdr_limit; phdr++) { in _phdr_table_set_load_prot()
744 if (phdr->p_type != PT_LOAD || (phdr->p_flags & PF_W) != 0) { in _phdr_table_set_load_prot()
748 ElfW(Addr) seg_page_start = PAGE_START(phdr->p_vaddr) + load_bias; in _phdr_table_set_load_prot()
749 ElfW(Addr) seg_page_end = PAGE_END(phdr->p_vaddr + phdr->p_memsz) + load_bias; in _phdr_table_set_load_prot()
751 int prot = PFLAGS_TO_PROT(phdr->p_flags); in _phdr_table_set_load_prot()
809 const ElfW(Phdr)* phdr = phdr_table; in _phdr_table_set_gnu_relro_prot()
810 const ElfW(Phdr)* phdr_limit = phdr + phdr_count; in _phdr_table_set_gnu_relro_prot()
812 for (phdr = phdr_table; phdr < phdr_limit; phdr++) { in _phdr_table_set_gnu_relro_prot()
813 if (phdr->p_type != PT_GNU_RELRO) { in _phdr_table_set_gnu_relro_prot()
833 ElfW(Addr) seg_page_start = PAGE_START(phdr->p_vaddr) + load_bias; in _phdr_table_set_gnu_relro_prot()
834 ElfW(Addr) seg_page_end = PAGE_END(phdr->p_vaddr + phdr->p_memsz) + load_bias; in _phdr_table_set_gnu_relro_prot()
885 const ElfW(Phdr)* phdr = phdr_table; in phdr_table_serialize_gnu_relro()
886 const ElfW(Phdr)* phdr_limit = phdr + phdr_count; in phdr_table_serialize_gnu_relro()
888 for (phdr = phdr_table; phdr < phdr_limit; phdr++) { in phdr_table_serialize_gnu_relro()
889 if (phdr->p_type != PT_GNU_RELRO) { in phdr_table_serialize_gnu_relro()
893 ElfW(Addr) seg_page_start = PAGE_START(phdr->p_vaddr) + load_bias; in phdr_table_serialize_gnu_relro()
894 ElfW(Addr) seg_page_end = PAGE_END(phdr->p_vaddr + phdr->p_memsz) + load_bias; in phdr_table_serialize_gnu_relro()
948 const ElfW(Phdr)* phdr = phdr_table; in phdr_table_map_gnu_relro()
949 const ElfW(Phdr)* phdr_limit = phdr + phdr_count; in phdr_table_map_gnu_relro()
951 for (phdr = phdr_table; phdr < phdr_limit; phdr++) { in phdr_table_map_gnu_relro()
952 if (phdr->p_type != PT_GNU_RELRO) { in phdr_table_map_gnu_relro()
956 ElfW(Addr) seg_page_start = PAGE_START(phdr->p_vaddr) + load_bias; in phdr_table_map_gnu_relro()
957 ElfW(Addr) seg_page_end = PAGE_END(phdr->p_vaddr + phdr->p_memsz) + load_bias; in phdr_table_map_gnu_relro()
1028 const ElfW(Phdr)* phdr = phdr_table; in phdr_table_get_arm_exidx()
1029 const ElfW(Phdr)* phdr_limit = phdr + phdr_count; in phdr_table_get_arm_exidx()
1031 for (phdr = phdr_table; phdr < phdr_limit; phdr++) { in phdr_table_get_arm_exidx()
1032 if (phdr->p_type != PT_ARM_EXIDX) { in phdr_table_get_arm_exidx()
1036 *arm_exidx = reinterpret_cast<ElfW(Addr)*>(load_bias + phdr->p_vaddr); in phdr_table_get_arm_exidx()
1037 *arm_exidx_count = phdr->p_memsz / 8; in phdr_table_get_arm_exidx()
1064 const ElfW(Phdr)& phdr = phdr_table[i]; in phdr_table_get_dynamic_section()
1065 if (phdr.p_type == PT_DYNAMIC) { in phdr_table_get_dynamic_section()
1066 *dynamic = reinterpret_cast<ElfW(Dyn)*>(load_bias + phdr.p_vaddr); in phdr_table_get_dynamic_section()
1068 *dynamic_flags = phdr.p_flags; in phdr_table_get_dynamic_section()
1087 const ElfW(Phdr)& phdr = phdr_table[i]; in phdr_table_get_interpreter_name()
1088 if (phdr.p_type == PT_INTERP) { in phdr_table_get_interpreter_name()
1089 return reinterpret_cast<const char*>(load_bias + phdr.p_vaddr); in phdr_table_get_interpreter_name()
1102 for (const ElfW(Phdr)* phdr = phdr_table_; phdr < phdr_limit; ++phdr) { in FindPhdr()
1103 if (phdr->p_type == PT_PHDR) { in FindPhdr()
1104 return CheckPhdr(load_bias_ + phdr->p_vaddr); in FindPhdr()
1111 for (const ElfW(Phdr)* phdr = phdr_table_; phdr < phdr_limit; ++phdr) { in FindPhdr()
1112 if (phdr->p_type == PT_LOAD) { in FindPhdr()
1113 if (phdr->p_offset == 0) { in FindPhdr()
1114 ElfW(Addr) elf_addr = load_bias_ + phdr->p_vaddr; in FindPhdr()
1133 for (const ElfW(Phdr)* phdr = phdr_table_; phdr < phdr_limit; ++phdr) { in CheckPhdr()
1134 if (phdr->p_type != PT_LOAD) { in CheckPhdr()
1137 ElfW(Addr) seg_start = phdr->p_vaddr + load_bias_; in CheckPhdr()
1138 ElfW(Addr) seg_end = phdr->p_filesz + seg_start; in CheckPhdr()