diff options
author | 2018-07-04 11:56:08 +0100 | |
---|---|---|
committer | 2018-07-19 13:42:20 +0100 | |
commit | ca8de0a70eab62707f3c71a211093f340fdcd5f4 (patch) | |
tree | a391c1307e87edad399418236a2a1842a8f06f34 /test/497-inlining-and-class-loader | |
parent | 7f7f9d3991f3a55da8934a3b72890d4776373598 (diff) |
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
Diffstat (limited to 'test/497-inlining-and-class-loader')
-rw-r--r-- | test/497-inlining-and-class-loader/clear_dex_cache.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/497-inlining-and-class-loader/clear_dex_cache.cc b/test/497-inlining-and-class-loader/clear_dex_cache.cc index c6fd56f20d..730e0741b8 100644 --- a/test/497-inlining-and-class-loader/clear_dex_cache.cc +++ b/test/497-inlining-and-class-loader/clear_dex_cache.cc @@ -54,7 +54,7 @@ extern "C" JNIEXPORT jobject JNICALL Java_Main_cloneResolvedMethods(JNIEnv* env, if (sizeof(void*) == 4) { ObjPtr<mirror::IntArray> int_array = ObjPtr<mirror::IntArray>::DownCast(decoded_array); int_array->Set(2u * i, index); - int_array->Set(2u * i + 1u, static_cast<jint>(reinterpret_cast<uintptr_t>(method))); + int_array->Set(2u * i + 1u, reinterpret_cast32<jint>(method)); } else { ObjPtr<mirror::LongArray> long_array = ObjPtr<mirror::LongArray>::DownCast(decoded_array); long_array->Set(2u * i, index); @@ -81,7 +81,7 @@ extern "C" JNIEXPORT void JNICALL Java_Main_restoreResolvedMethods( if (sizeof(void*) == 4) { ObjPtr<mirror::IntArray> int_array = down_cast<mirror::IntArray*>(old.Ptr()); index = static_cast<uint32_t>(int_array->Get(2u * i)); - method = reinterpret_cast<ArtMethod*>(static_cast<uint32_t>(int_array->Get(2u * i + 1u))); + method = reinterpret_cast32<ArtMethod*>(int_array->Get(2u * i + 1u)); } else { ObjPtr<mirror::LongArray> long_array = down_cast<mirror::LongArray*>(old.Ptr()); index = dchecked_integral_cast<uint32_t>(long_array->Get(2u * i)); |