diff options
| author | David Srbecky <dsrbecky@google.com> | 2017-12-06 15:18:38 +0000 |
|---|---|---|
| committer | David Srbecky <dsrbecky@google.com> | 2017-12-12 11:42:21 +0000 |
| commit | e155f4b858be42a825e8270f65abb0fdcf6cbc9f (patch) | |
| tree | 545d99febd61872a7a7c1c8e77e53b104db0ad7a /compiler/debug/elf_debug_info_writer.h | |
| parent | bc96fc6e2d8dd02e9b085b1c7ec03c3f01982816 (diff) | |
| download | art-e155f4b858be42a825e8270f65abb0fdcf6cbc9f.tar.gz art-e155f4b858be42a825e8270f65abb0fdcf6cbc9f.tar.bz2 art-e155f4b858be42a825e8270f65abb0fdcf6cbc9f.zip | |
Decouple virtual memory allocation in ElfBuilder.
Multi-boot-image requires knowing the loaded size ahead of time,
and calculating that size ended up being fairly hacky.
Decouple allocation of virtual memory and allocation of file space,
so that we have more flexibility when we do those.
Test: The generated boot image is bit-for-bit identical as before.
Change-Id: I012b55a71e7625f2310570f9b91447c9db73578b
Diffstat (limited to 'compiler/debug/elf_debug_info_writer.h')
| -rw-r--r-- | compiler/debug/elf_debug_info_writer.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/debug/elf_debug_info_writer.h b/compiler/debug/elf_debug_info_writer.h index d5999941d7..2c5a2f436e 100644 --- a/compiler/debug/elf_debug_info_writer.h +++ b/compiler/debug/elf_debug_info_writer.h @@ -296,7 +296,7 @@ class ElfCompilationUnitWriter { CHECK_EQ(info_.Depth(), 0); std::vector<uint8_t> buffer; buffer.reserve(info_.data()->size() + KB); - const size_t offset = owner_->builder_->GetDebugInfo()->GetSize(); + const size_t offset = owner_->builder_->GetDebugInfo()->GetPosition(); // All compilation units share single table which is at the start of .debug_abbrev. const size_t debug_abbrev_offset = 0; WriteDebugInfoCU(debug_abbrev_offset, info_, offset, &buffer, &owner_->debug_info_patches_); @@ -461,7 +461,7 @@ class ElfCompilationUnitWriter { CHECK_EQ(info_.Depth(), 0); std::vector<uint8_t> buffer; buffer.reserve(info_.data()->size() + KB); - const size_t offset = owner_->builder_->GetDebugInfo()->GetSize(); + const size_t offset = owner_->builder_->GetDebugInfo()->GetPosition(); // All compilation units share single table which is at the start of .debug_abbrev. const size_t debug_abbrev_offset = 0; WriteDebugInfoCU(debug_abbrev_offset, info_, offset, &buffer, &owner_->debug_info_patches_); |
