Use pre-allocated Throwables from the boot image.

The pre-allocated OOMEs and NoClassDefFoundError were stored
in the boot image but they were not used, we instead used to
allocate and use new objects. This change adds references to
the image roots, so that these Throwables can be used when
starting the runtime using the boot image.

Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 77947463
Change-Id: I2079344dee61242bf0bef5c32770c33ac8a6b7a4
diff --git a/patchoat/patchoat.cc b/patchoat/patchoat.cc
index a6d3903..3c0b3e4 100644
--- a/patchoat/patchoat.cc
+++ b/patchoat/patchoat.cc
@@ -973,7 +973,7 @@
   ImageHeader* image_header = reinterpret_cast<ImageHeader*>(image_->Begin());
   CHECK_GT(image_->Size(), sizeof(ImageHeader));
   // These are the roots from the original file.
-  auto* img_roots = image_header->GetImageRoots();
+  mirror::ObjectArray<mirror::Object>* img_roots = image_header->GetImageRoots().Ptr();
   image_header->RelocateImage(delta_);
 
   PatchArtFields(image_header);