Lines Matching refs:offset
211 uint64_t offset = ehdr.e_phoff; in GetLoadBias() local
212 for (size_t i = 0; i < ehdr.e_phnum; i++, offset += ehdr.e_phentsize) { in GetLoadBias()
214 if (!memory->ReadFully(offset, &phdr, sizeof(phdr))) { in GetLoadBias()
228 uint64_t offset = ehdr.e_phoff; in ReadProgramHeaders() local
230 for (size_t i = 0; i < ehdr.e_phnum; i++, offset += ehdr.e_phentsize) { in ReadProgramHeaders()
232 if (!memory_->ReadFully(offset, &phdr, sizeof(phdr))) { in ReadProgramHeaders()
285 uint64_t offset = 0; in ReadBuildID() local
286 while (offset < gnu_build_id_size_) { in ReadBuildID()
287 if (gnu_build_id_size_ - offset < sizeof(NhdrType)) { in ReadBuildID()
291 if (!memory_->ReadFully(gnu_build_id_offset_ + offset, &hdr, sizeof(hdr))) { in ReadBuildID()
294 offset += sizeof(hdr); in ReadBuildID()
296 if (gnu_build_id_size_ - offset < hdr.n_namesz) { in ReadBuildID()
301 if (!memory_->ReadFully(gnu_build_id_offset_ + offset, &(name[0]), hdr.n_namesz)) { in ReadBuildID()
310 offset += (hdr.n_namesz + 3) & ~3; in ReadBuildID()
313 if (gnu_build_id_size_ - offset < hdr.n_descsz || hdr.n_descsz == 0) { in ReadBuildID()
317 if (memory_->ReadFully(gnu_build_id_offset_ + offset, &build_id[0], hdr.n_descsz)) { in ReadBuildID()
324 offset += (hdr.n_descsz + 3) & ~3; in ReadBuildID()
331 uint64_t offset = ehdr.e_shoff; in ReadSectionHeaders() local
340 uint64_t sh_offset = offset + ehdr.e_shstrndx * ehdr.e_shentsize; in ReadSectionHeaders()
348 offset += ehdr.e_shentsize; in ReadSectionHeaders()
349 for (size_t i = 1; i < ehdr.e_shnum; i++, offset += ehdr.e_shentsize) { in ReadSectionHeaders()
350 if (!memory_->ReadFully(offset, &shdr, sizeof(shdr))) { in ReadSectionHeaders()
435 uint64_t offset = dynamic_offset_; in GetSonameWithTemplate() local
436 uint64_t max_offset = offset + dynamic_vaddr_end_ - dynamic_vaddr_start_; in GetSonameWithTemplate()
437 for (uint64_t offset = dynamic_offset_; offset < max_offset; offset += sizeof(DynType)) { in GetSonameWithTemplate() local
438 if (!memory_->ReadFully(offset, &dyn, sizeof(dyn))) { in GetSonameWithTemplate()
440 last_error_.address = offset; in GetSonameWithTemplate()
589 uint64_t offset = ehdr.e_shoff; in GetBuildIDInfo() local
597 uint64_t sh_offset = offset + ehdr.e_shstrndx * ehdr.e_shentsize; in GetBuildIDInfo()
605 offset += ehdr.e_shentsize; in GetBuildIDInfo()
606 for (size_t i = 1; i < ehdr.e_shnum; i++, offset += ehdr.e_shentsize) { in GetBuildIDInfo()
607 if (!memory->ReadFully(offset, &shdr, sizeof(shdr))) { in GetBuildIDInfo()
637 uint64_t offset = 0; in ReadBuildIDFromMemory() local
638 while (offset < note_size) { in ReadBuildIDFromMemory()
639 if (note_size - offset < sizeof(NhdrType)) { in ReadBuildIDFromMemory()
643 if (!memory->ReadFully(note_offset + offset, &hdr, sizeof(hdr))) { in ReadBuildIDFromMemory()
646 offset += sizeof(hdr); in ReadBuildIDFromMemory()
648 if (note_size - offset < hdr.n_namesz) { in ReadBuildIDFromMemory()
653 if (!memory->ReadFully(note_offset + offset, &(name[0]), hdr.n_namesz)) { in ReadBuildIDFromMemory()
661 offset += (hdr.n_namesz + 3) & ~3; in ReadBuildIDFromMemory()
664 if (note_size - offset < hdr.n_descsz || hdr.n_descsz == 0) { in ReadBuildIDFromMemory()
668 if (memory->ReadFully(note_offset + offset, &build_id[0], hdr.n_descsz)) { in ReadBuildIDFromMemory()
675 offset += (hdr.n_descsz + 3) & ~3; in ReadBuildIDFromMemory()