Lines Matching refs:offset

129   uint8_t* compressed_data = elf_memory->GetPtr(info.offset);  in CreateMemoryFromCompressedSection()
131 if (compressed_data == nullptr || elf_memory->GetPtr(info.offset + info.size - 1) == nullptr) { in CreateMemoryFromCompressedSection()
133 if (!elf_memory->ReadFully(info.offset, compressed.data(), info.size)) { in CreateMemoryFromCompressedSection()
140 std::shared_ptr<MemoryBuffer> memory(new MemoryBuffer(chdr->ch_size, info.offset)); in CreateMemoryFromCompressedSection()
161 if (eh_frame_hdr_info_.offset != 0) { in InitHeaders()
170 if (eh_frame_.get() == nullptr && eh_frame_info_.offset != 0) { in InitHeaders()
180 if (debug_frame_info_.offset != 0) { in InitHeaders()
216 uint64_t offset = ehdr.e_phoff; in GetLoadBias() local
217 for (size_t i = 0; i < ehdr.e_phnum; i++, offset += ehdr.e_phentsize) { in GetLoadBias()
219 if (!memory->ReadFully(offset, &phdr, sizeof(phdr))) { in GetLoadBias()
233 uint64_t offset = ehdr.e_phoff; in ReadProgramHeaders() local
235 for (size_t i = 0; i < ehdr.e_phnum; i++, offset += ehdr.e_phentsize) { in ReadProgramHeaders()
237 if (!memory_->ReadFully(offset, &phdr, sizeof(phdr))) { in ReadProgramHeaders()
261 .offset = phdr.p_offset, in ReadProgramHeaders()
292 uint64_t offset = 0; in ReadBuildID() local
293 while (offset < gnu_build_id_size_) { in ReadBuildID()
294 if (gnu_build_id_size_ - offset < sizeof(NhdrType)) { in ReadBuildID()
298 if (!memory_->ReadFully(gnu_build_id_offset_ + offset, &hdr, sizeof(hdr))) { in ReadBuildID()
301 offset += sizeof(hdr); in ReadBuildID()
303 if (gnu_build_id_size_ - offset < hdr.n_namesz) { in ReadBuildID()
308 if (!memory_->ReadFully(gnu_build_id_offset_ + offset, &(name[0]), hdr.n_namesz)) { in ReadBuildID()
317 offset += (hdr.n_namesz + 3) & ~3; in ReadBuildID()
320 if (gnu_build_id_size_ - offset < hdr.n_descsz || hdr.n_descsz == 0) { in ReadBuildID()
324 if (memory_->ReadFully(gnu_build_id_offset_ + offset, &build_id[0], hdr.n_descsz)) { in ReadBuildID()
331 offset += (hdr.n_descsz + 3) & ~3; in ReadBuildID()
337 uint64_t offset = ehdr.e_shoff; in ReadSectionHeaders() local
346 uint64_t sh_offset = offset + ehdr.e_shstrndx * ehdr.e_shentsize; in ReadSectionHeaders()
354 offset += ehdr.e_shentsize; in ReadSectionHeaders()
355 for (size_t i = 1; i < ehdr.e_shnum; i++, offset += ehdr.e_shentsize) { in ReadSectionHeaders()
356 if (!memory_->ReadFully(offset, &shdr, sizeof(shdr))) { in ReadSectionHeaders()
383 .offset = shdr.sh_offset, in ReadSectionHeaders()
392 .offset = shdr.sh_offset, in ReadSectionHeaders()
396 } else if (eh_frame_hdr_info_.offset == 0 && name == ".eh_frame_hdr") { in ReadSectionHeaders()
398 .offset = shdr.sh_offset, in ReadSectionHeaders()
450 uint64_t offset = dynamic_offset_; in GetSoname() local
451 uint64_t max_offset = offset + dynamic_vaddr_end_ - dynamic_vaddr_start_; in GetSoname()
452 for (uint64_t offset = dynamic_offset_; offset < max_offset; offset += sizeof(DynType)) { in GetSoname() local
453 if (!memory_->ReadFully(offset, &dyn, sizeof(dyn))) { in GetSoname()
455 last_error_.address = offset; in GetSoname()
601 uint64_t offset = ehdr.e_phoff; in GetMaxSize() local
602 for (size_t i = 0; i < ehdr.e_phnum; i++, offset += ehdr.e_phentsize) { in GetMaxSize()
604 if (!memory->ReadFully(offset, &phdr, sizeof(phdr))) { in GetMaxSize()
628 uint64_t offset = ehdr.e_shoff; in GetBuildIDInfo() local
636 uint64_t sh_offset = offset + ehdr.e_shstrndx * ehdr.e_shentsize; in GetBuildIDInfo()
644 offset += ehdr.e_shentsize; in GetBuildIDInfo()
645 for (size_t i = 1; i < ehdr.e_shnum; i++, offset += ehdr.e_shentsize) { in GetBuildIDInfo()
646 if (!memory->ReadFully(offset, &shdr, sizeof(shdr))) { in GetBuildIDInfo()
676 uint64_t offset = 0; in ReadBuildIDFromMemory() local
677 while (offset < note_size) { in ReadBuildIDFromMemory()
678 if (note_size - offset < sizeof(NhdrType)) { in ReadBuildIDFromMemory()
682 if (!memory->ReadFully(note_offset + offset, &hdr, sizeof(hdr))) { in ReadBuildIDFromMemory()
685 offset += sizeof(hdr); in ReadBuildIDFromMemory()
687 if (note_size - offset < hdr.n_namesz) { in ReadBuildIDFromMemory()
692 if (!memory->ReadFully(note_offset + offset, &(name[0]), hdr.n_namesz)) { in ReadBuildIDFromMemory()
700 offset += (hdr.n_namesz + 3) & ~3; in ReadBuildIDFromMemory()
703 if (note_size - offset < hdr.n_descsz || hdr.n_descsz == 0) { in ReadBuildIDFromMemory()
707 if (memory->ReadFully(note_offset + offset, &build_id[0], hdr.n_descsz)) { in ReadBuildIDFromMemory()
714 offset += (hdr.n_descsz + 3) & ~3; in ReadBuildIDFromMemory()