From 0f6af5e3b51a7f5905d09a98ec8d531541666015 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Mon, 30 Jan 2023 14:29:11 +0000 Subject: Reland "Write classes in runtime-generated app image." This reverts commit 24b3d648ff6c2c200003f55ac63fc910d7bfd40f. Bug: 260557058 Reason for revert: - Encode class loader context in image, and check it at load time. - Set nterp entrypoint to methods that can. Test: test.py Test: atest com.android.bluetooth.opp.BluetoothOppObexServerSessionTest#onPut_withUnsupportedMimeTypeInHeader_returnsHttpBadRequest Change-Id: Ibf4a8604c4a226d1acc021103668e211446bb53c --- runtime/image.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'runtime/image.h') diff --git a/runtime/image.h b/runtime/image.h index caf1aa57a2..88cfad0303 100644 --- a/runtime/image.h +++ b/runtime/image.h @@ -230,8 +230,10 @@ class PACKED(8) ImageHeader { // Aliases. kAppImageClassLoader = kSpecialRoots, // The class loader used to build the app image. kBootImageLiveObjects = kSpecialRoots, // Array of boot image objects that must be kept live. - kAppImageDexChecksums = kSpecialRoots, // Array of dex checksums for app images generated by - // the runtime. + kAppImageContextAndDexChecksums = kSpecialRoots, // Array of size 2, containing the class + // loader context in first entry, and an array + // of dex checksums for app images generated + // by the runtime. }; enum BootImageLiveObjects { -- cgit v1.2.3-59-g8ed1b