From c6b76767193322b086caad0d3968552e0229b28f Mon Sep 17 00:00:00 2001 From: Alex Light Date: Thu, 24 Jul 2014 16:26:13 -0700 Subject: [PATCH] Make system use patchoat to relocate during runtime. Change DexPreOpt to include patch information of all compiled files so we can relocate at runtime. Bug: 15358152 (cherry picked from commit ce090d3f4508cb9130ab700833ae51a7fff8b373) Change-Id: I75a1eec3a38d6bce1f678c510d57849f8dfa04fa --- core/dex_preopt_libart.mk | 3 ++- core/dex_preopt_libart_boot.mk | 2 +- target/product/runtime_libart.mk | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/dex_preopt_libart.mk b/core/dex_preopt_libart.mk index 2d9c518b2..11b7406ba 100644 --- a/core/dex_preopt_libart.mk +++ b/core/dex_preopt_libart.mk @@ -90,5 +90,6 @@ $(hide) $(DEX2OATD) \ --oat-file=$(2) \ --android-root=$(PRODUCT_OUT)/system \ --instruction-set=$($(PRIVATE_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH) \ - --instruction-set-features=$($(PRIVATE_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) + --instruction-set-features=$($(PRIVATE_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) \ + --include-patch-information --runtime-arg -Xnorelocate endef diff --git a/core/dex_preopt_libart_boot.mk b/core/dex_preopt_libart_boot.mk index 7eefc0b2d..5390a3681 100644 --- a/core/dex_preopt_libart_boot.mk +++ b/core/dex_preopt_libart_boot.mk @@ -53,4 +53,4 @@ $($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME) : $(LIBART_TARGE --image=$@ --base=$(LIBART_IMG_TARGET_BASE_ADDRESS) \ --instruction-set=$($(PRIVATE_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH) \ --instruction-set-features=$($(PRIVATE_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) \ - --android-root=$(PRODUCT_OUT)/system + --android-root=$(PRODUCT_OUT)/system --include-patch-information --runtime-arg -Xnorelocate diff --git a/target/product/runtime_libart.mk b/target/product/runtime_libart.mk index 6cb881845..8f5f24dd6 100644 --- a/target/product/runtime_libart.mk +++ b/target/product/runtime_libart.mk @@ -20,7 +20,8 @@ PRODUCT_PACKAGES += \ core-libart \ libart \ dex2oat \ - oatdump + oatdump \ + patchoat PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ dalvik.vm.image-dex2oat-Xms=64m \