Move .art.rel data to a section in .art, part 1.
Refactor the code so that we can collect all relocation
offsets while writing the image.
Test: Manually verify that the aosp_taimen-userdebug boot
image is identical before and after this change;
using WIP follow-up code, check that we record the
same locations as the patchoat-generated .rel files.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 77856493
Change-Id: Id8c78e417e77e859a82a680504253f41e84560d6
diff --git a/patchoat/patchoat.cc b/patchoat/patchoat.cc
index 97b315e..cb776bf 100644
--- a/patchoat/patchoat.cc
+++ b/patchoat/patchoat.cc
@@ -886,7 +886,7 @@
explicit RelocatedPointerVisitor(PatchOat* patch_oat) : patch_oat_(patch_oat) {}
template <typename T>
- T* operator()(T* ptr, void** dest_addr ATTRIBUTE_UNUSED = 0) const {
+ T* operator()(T* ptr, void** dest_addr ATTRIBUTE_UNUSED = nullptr) const {
return patch_oat_->RelocatedAddressOfPointer(ptr);
}