Lines Matching refs:phdr
161 PhdrType phdr; in GetLoadBias() local
162 if (!memory->ReadFully(offset, &phdr, sizeof(phdr))) { in GetLoadBias()
167 if (phdr.p_type == PT_LOAD && (phdr.p_flags & PF_X)) { in GetLoadBias()
168 return static_cast<uint64_t>(phdr.p_vaddr) - phdr.p_offset; in GetLoadBias()
179 PhdrType phdr; in ReadProgramHeaders() local
180 if (!memory_->ReadFully(offset, &phdr, sizeof(phdr))) { in ReadProgramHeaders()
184 switch (phdr.p_type) { in ReadProgramHeaders()
187 if ((phdr.p_flags & PF_X) == 0) { in ReadProgramHeaders()
191 pt_loads_[phdr.p_offset] = LoadInfo{phdr.p_offset, phdr.p_vaddr, in ReadProgramHeaders()
192 static_cast<size_t>(phdr.p_memsz)}; in ReadProgramHeaders()
195 *load_bias = static_cast<uint64_t>(phdr.p_vaddr) - phdr.p_offset; in ReadProgramHeaders()
203 eh_frame_hdr_offset_ = phdr.p_offset; in ReadProgramHeaders()
204 eh_frame_hdr_section_bias_ = static_cast<uint64_t>(phdr.p_vaddr) - phdr.p_offset; in ReadProgramHeaders()
205 eh_frame_hdr_size_ = phdr.p_memsz; in ReadProgramHeaders()
209 dynamic_offset_ = phdr.p_offset; in ReadProgramHeaders()
210 dynamic_vaddr_start_ = phdr.p_vaddr; in ReadProgramHeaders()
211 if (__builtin_add_overflow(dynamic_vaddr_start_, phdr.p_memsz, &dynamic_vaddr_end_)) { in ReadProgramHeaders()
219 HandleUnknownType(phdr.p_type, phdr.p_offset, phdr.p_filesz); in ReadProgramHeaders()