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_line_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_line_writer.h')
| -rw-r--r-- | compiler/debug/elf_debug_line_writer.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/debug/elf_debug_line_writer.h b/compiler/debug/elf_debug_line_writer.h index 943e03a765..f8e1bf7a72 100644 --- a/compiler/debug/elf_debug_line_writer.h +++ b/compiler/debug/elf_debug_line_writer.h @@ -60,7 +60,7 @@ class ElfDebugLineWriter { ? builder_->GetText()->GetAddress() : 0; - compilation_unit.debug_line_offset = builder_->GetDebugLine()->GetSize(); + compilation_unit.debug_line_offset = builder_->GetDebugLine()->GetPosition(); std::vector<dwarf::FileEntry> files; std::unordered_map<std::string, size_t> files_map; @@ -268,7 +268,7 @@ class ElfDebugLineWriter { } std::vector<uint8_t> buffer; buffer.reserve(opcodes.data()->size() + KB); - size_t offset = builder_->GetDebugLine()->GetSize(); + size_t offset = builder_->GetDebugLine()->GetPosition(); WriteDebugLineTable(directories, files, opcodes, offset, &buffer, &debug_line_patches_); builder_->GetDebugLine()->WriteFully(buffer.data(), buffer.size()); return buffer.size(); |
