Lines Matching refs:offset
288 bool ElfFileImpl<ElfTypes>::CheckAndSet(Elf32_Off offset, const char* label,
290 if (Begin() + offset >= End()) {
291 *error_msg = StringPrintf("Offset %d is out of range for %s in ELF file: '%s'", offset, label,
295 *target = Begin() + offset;
404 int64_t offset = static_cast<int64_t>(GetHeader().e_shoff +
406 if (offset >= file->GetLength()) {
1408 // | Elf_Ehdr | contains number of Elf_Shdr and offset to first
1425 // | ... | contains offset to section start
1465 // section 0 is the null section, sections start at offset of first section
1467 Elf_Off offset = GetSectionHeader(1)->sh_offset;
1474 offset = RoundUp(offset, old_sh->sh_addralign);
1476 if (old_sh->sh_offset == offset) {
1478 offset += old_sh->sh_size;
1482 memmove(Begin() + offset,
1485 new_sh.sh_offset = offset;
1486 offset += old_sh->sh_size;
1489 Elf_Off shoff = offset;
1491 memcpy(Begin() + offset, §ion_headers[0], section_headers_size_in_bytes);
1492 offset += section_headers_size_in_bytes;
1496 int result = ftruncate(file->Fd(), offset);
1811 bool ElfFile::GetSectionOffsetAndSize(const char* section_name, uint64_t* offset,
1820 if (offset != nullptr) {
1821 *offset = shdr->sh_offset;
1832 if (offset != nullptr) {
1833 *offset = shdr->sh_offset;