summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/driver/compiler_driver.cc2
-rw-r--r--compiler/elf_writer_debug.cc4
-rw-r--r--compiler/image_test.cc2
-rw-r--r--compiler/image_writer.cc2
-rw-r--r--compiler/oat_writer.cc2
5 files changed, 6 insertions, 6 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index ecbc3a2cf7..bf3a8658da 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -1552,7 +1552,7 @@ void CompilerDriver::GetCodeAndMethodForDirectCall(InvokeType* type, InvokeType
*type = sharp_type;
}
} else {
- auto* image_space = heap->GetImageSpace();
+ auto* image_space = heap->GetBootImageSpace();
bool method_in_image = false;
if (image_space != nullptr) {
const auto& method_section = image_space->GetImageHeader().GetMethodsSection();
diff --git a/compiler/elf_writer_debug.cc b/compiler/elf_writer_debug.cc
index 90db7eb41a..73262333b6 100644
--- a/compiler/elf_writer_debug.cc
+++ b/compiler/elf_writer_debug.cc
@@ -451,12 +451,12 @@ void WriteDebugSections(ElfBuilder<ElfTypes>* builder,
opcodes.EndSequence();
WriteDebugLineTable(directories, files, opcodes, &debug_line, &debug_line_patches);
}
+ builder->WriteSection(".debug_line", &debug_line);
+ builder->WritePatches(".debug_line.oat_patches", &debug_line_patches);
builder->WriteSection(".debug_info", &debug_info);
builder->WritePatches(".debug_info.oat_patches", &debug_info_patches);
builder->WriteSection(".debug_abbrev", &debug_abbrev);
builder->WriteSection(".debug_str", &debug_str);
- builder->WriteSection(".debug_line", &debug_line);
- builder->WritePatches(".debug_line.oat_patches", &debug_line_patches);
}
// Explicit instantiations
diff --git a/compiler/image_test.cc b/compiler/image_test.cc
index a38e1f54c0..6df15279a0 100644
--- a/compiler/image_test.cc
+++ b/compiler/image_test.cc
@@ -181,7 +181,7 @@ TEST_F(ImageTest, WriteRead) {
ASSERT_TRUE(heap->HasImageSpace());
ASSERT_TRUE(heap->GetNonMovingSpace()->IsMallocSpace());
- gc::space::ImageSpace* image_space = heap->GetImageSpace();
+ gc::space::ImageSpace* image_space = heap->GetBootImageSpace();
ASSERT_TRUE(image_space != nullptr);
ASSERT_LE(image_space->Size(), image_file_size);
diff --git a/compiler/image_writer.cc b/compiler/image_writer.cc
index dd2ea9e443..3f18d9aa0f 100644
--- a/compiler/image_writer.cc
+++ b/compiler/image_writer.cc
@@ -1589,7 +1589,7 @@ const uint8_t* ImageWriter::GetOatAddress(OatAddress type) const {
// If we are compiling an app image, we need to use the stubs of the boot image.
if (compile_app_image_) {
// Use the current image pointers.
- gc::space::ImageSpace* image_space = Runtime::Current()->GetHeap()->GetImageSpace();
+ gc::space::ImageSpace* image_space = Runtime::Current()->GetHeap()->GetBootImageSpace();
DCHECK(image_space != nullptr);
const OatFile* oat_file = image_space->GetOatFile();
CHECK(oat_file != nullptr);
diff --git a/compiler/oat_writer.cc b/compiler/oat_writer.cc
index 3f2271ef11..40a3f14f93 100644
--- a/compiler/oat_writer.cc
+++ b/compiler/oat_writer.cc
@@ -899,7 +899,7 @@ class OatWriter::WriteCodeMethodVisitor : public OatDexMethodVisitor {
// NOTE: We're using linker patches for app->boot references when the image can
// be relocated and therefore we need to emit .oat_patches. We're not using this
// for app->app references, so check that the method is an image method.
- gc::space::ImageSpace* image_space = Runtime::Current()->GetHeap()->GetImageSpace();
+ gc::space::ImageSpace* image_space = Runtime::Current()->GetHeap()->GetBootImageSpace();
size_t method_offset = reinterpret_cast<const uint8_t*>(method) - image_space->Begin();
CHECK(image_space->GetImageHeader().GetMethodsSection().Contains(method_offset));
}