Lines Matching refs:relative_offset
339 DCHECK_EQ(static_cast<off_t>(file_offset + relative_offset), out->Seek(0, kSeekCurrent)) \
340 << "file_offset=" << file_offset << " relative_offset=" << relative_offset
1532 size_t relative_offset, in WriteCodeMethodVisitor() argument
1536 offset_(relative_offset), in WriteCodeMethodVisitor()
2470 size_t relative_offset = current_offset - file_offset; in WriteRodata() local
2476 relative_offset = WriteClassOffsets(out, file_offset, relative_offset); in WriteRodata()
2477 if (relative_offset == 0) { in WriteRodata()
2482 relative_offset = WriteClasses(out, file_offset, relative_offset); in WriteRodata()
2483 if (relative_offset == 0) { in WriteRodata()
2488 relative_offset = WriteIndexBssMappings(out, file_offset, relative_offset); in WriteRodata()
2489 if (relative_offset == 0) { in WriteRodata()
2494 relative_offset = WriteMaps(out, file_offset, relative_offset); in WriteRodata()
2495 if (relative_offset == 0) { in WriteRodata()
2500 relative_offset = WriteOatDexFiles(out, file_offset, relative_offset); in WriteRodata()
2501 if (relative_offset == 0) { in WriteRodata()
2506 relative_offset = WriteBcpBssInfo(out, file_offset, relative_offset); in WriteRodata()
2507 if (relative_offset == 0) { in WriteRodata()
2514 relative_offset += size_executable_offset_alignment_; in WriteRodata()
2515 DCHECK_EQ(relative_offset, oat_header_->GetExecutableOffset()); in WriteRodata()
2516 size_t expected_file_offset = file_offset + relative_offset; in WriteRodata()
2562 size_t relative_offset = oat_header_->GetExecutableOffset(); in WriteCode() local
2565 relative_offset = WriteCode(out, file_offset, relative_offset); in WriteCode()
2566 if (relative_offset == 0) { in WriteCode()
2571 relative_offset = WriteCodeDexFiles(out, file_offset, relative_offset); in WriteCode()
2572 if (relative_offset == 0) { in WriteCode()
2580 if (!CheckOatSize(out, file_offset, relative_offset)) { in WriteCode()
2596 size_t relative_offset = data_img_rel_ro_start_; in WriteDataImgRelRo() local
2601 DCHECK_EQ(RoundUp(code_end, kElfSegmentAlignment), relative_offset); in WriteDataImgRelRo()
2602 size_t padding_size = relative_offset - code_end; in WriteDataImgRelRo()
2606 relative_offset = WriteDataImgRelRo(out, file_offset, relative_offset); in WriteDataImgRelRo()
2607 if (relative_offset == 0) { in WriteDataImgRelRo()
2612 if (!CheckOatSize(out, file_offset, relative_offset)) { in WriteDataImgRelRo()
2619 bool OatWriter::CheckOatSize(OutputStream* out, size_t file_offset, size_t relative_offset) { in CheckOatSize() argument
2708 CHECK_EQ(oat_size_, relative_offset); in CheckOatSize()
2765 size_t OatWriter::WriteClassOffsets(OutputStream* out, size_t file_offset, size_t relative_offset) { in WriteClassOffsets() argument
2769 if (UNLIKELY(!IsAligned<4u>(relative_offset))) { in WriteClassOffsets()
2770 size_t padding_size = RoundUp(relative_offset, 4u) - relative_offset; in WriteClassOffsets()
2774 relative_offset += padding_size; in WriteClassOffsets()
2780 relative_offset += oat_dex_file.GetClassOffsetsRawSize(); in WriteClassOffsets()
2783 return relative_offset; in WriteClassOffsets()
2786 size_t OatWriter::WriteClasses(OutputStream* out, size_t file_offset, size_t relative_offset) { in WriteClasses() argument
2793 DCHECK_ALIGNED(relative_offset, 4u); in WriteClasses()
2798 relative_offset += oat_class_headers_[i].SizeOf(); in WriteClasses()
2803 relative_offset += oat_classes_[i].SizeOf(); in WriteClasses()
2806 return relative_offset; in WriteClasses()
2809 size_t OatWriter::WriteMaps(OutputStream* out, size_t file_offset, size_t relative_offset) { in WriteMaps() argument
2814 relative_offset += code_info_data_.size(); in WriteMaps()
2819 return relative_offset; in WriteMaps()
2878 size_t relative_offset, in WriteIndexBssMappingsHelper() argument
2890 DCHECK_EQ(relative_offset, method_bss_mapping_offset); in WriteIndexBssMappingsHelper()
2904 relative_offset += method_mappings_size; in WriteIndexBssMappingsHelper()
2912 DCHECK_EQ(relative_offset, type_bss_mapping_offset); in WriteIndexBssMappingsHelper()
2920 relative_offset += type_mappings_size; in WriteIndexBssMappingsHelper()
2928 DCHECK_EQ(relative_offset, public_type_bss_mapping_offset); in WriteIndexBssMappingsHelper()
2936 relative_offset += public_type_mappings_size; in WriteIndexBssMappingsHelper()
2944 DCHECK_EQ(relative_offset, package_type_bss_mapping_offset); in WriteIndexBssMappingsHelper()
2952 relative_offset += package_type_mappings_size; in WriteIndexBssMappingsHelper()
2960 DCHECK_EQ(relative_offset, string_bss_mapping_offset); in WriteIndexBssMappingsHelper()
2974 relative_offset += string_mappings_size; in WriteIndexBssMappingsHelper()
2982 DCHECK_EQ(relative_offset, method_type_bss_mapping_offset); in WriteIndexBssMappingsHelper()
2997 relative_offset += method_type_mappings_size; in WriteIndexBssMappingsHelper()
3002 return relative_offset; in WriteIndexBssMappingsHelper()
3007 size_t relative_offset) { in WriteIndexBssMappings() argument
3015 return relative_offset; in WriteIndexBssMappings()
3020 DCHECK_ALIGNED(relative_offset, sizeof(uint32_t)); in WriteIndexBssMappings()
3025 relative_offset = WriteIndexBssMappingsHelper(out, in WriteIndexBssMappings()
3027 relative_offset, in WriteIndexBssMappings()
3035 if (relative_offset == 0u) { in WriteIndexBssMappings()
3058 relative_offset = in WriteIndexBssMappings()
3061 relative_offset, in WriteIndexBssMappings()
3069 if (relative_offset == 0u) { in WriteIndexBssMappings()
3074 return relative_offset; in WriteIndexBssMappings()
3077 size_t OatWriter::WriteOatDexFiles(OutputStream* out, size_t file_offset, size_t relative_offset) { in WriteOatDexFiles() argument
3082 DCHECK_EQ(relative_offset, oat_dex_file->offset_); in WriteOatDexFiles()
3089 relative_offset += oat_dex_file->SizeOf(); in WriteOatDexFiles()
3092 return relative_offset; in WriteOatDexFiles()
3095 size_t OatWriter::WriteBcpBssInfo(OutputStream* out, size_t file_offset, size_t relative_offset) { in WriteBcpBssInfo() argument
3101 return relative_offset; in WriteBcpBssInfo()
3109 relative_offset += size_bcp_bss_info_size_; in WriteBcpBssInfo()
3112 DCHECK_EQ(relative_offset, bcp_bss_info_[i].offset_); in WriteBcpBssInfo()
3117 relative_offset += BssMappingInfo::SizeOf(); in WriteBcpBssInfo()
3120 return relative_offset; in WriteBcpBssInfo()
3123 size_t OatWriter::WriteCode(OutputStream* out, size_t file_offset, size_t relative_offset) { in WriteCode() argument
3129 uint32_t aligned_offset = CompiledCode::AlignCode(relative_offset + 4, instruction_set); \ in WriteCode()
3130 uint32_t alignment_padding = aligned_offset - relative_offset; \ in WriteCode()
3141 relative_offset += alignment_padding + (field)->size(); \ in WriteCode()
3154 return relative_offset; in WriteCode()
3159 size_t relative_offset) { in WriteCodeDexFiles() argument
3169 return relative_offset; in WriteCodeDexFiles()
3178 relative_offset, in WriteCodeDexFiles()
3183 relative_offset = visitor.GetOffset(); in WriteCodeDexFiles()
3189 return relative_offset; in WriteCodeDexFiles()
3194 size_t relative_offset) { in WriteDataImgRelRo() argument
3196 return relative_offset; in WriteDataImgRelRo()
3235 relative_offset += size_data_img_rel_ro_; in WriteDataImgRelRo()
3236 return relative_offset; in WriteDataImgRelRo()