From dbf3bfffc6300fdd9b6bd13b95cf7fee04849733 Mon Sep 17 00:00:00 2001 From: Rahul Chaudhry Date: Wed, 21 Mar 2018 11:31:09 -0700 Subject: [PATCH] Disable relocation_packer and migrate to SHT_RELR sections. Proposal for adding SHT_RELR sections in the generic-abi is at https://groups.google.com/forum/#!topic/generic-abi/bX460iggiKg Comparison with relocation_packer for aosp_marlin-userdebug: $ du -B1 -s */out/target/product/marlin/system 996958208 base/out/target/product/marlin/system 1008340992 no_pack/out/target/product/marlin/system 997801984 sht_relr/out/target/product/marlin/system base contains a build with current settings. no_pack contains a build with relocation_packer disabled. sht_relr contains a build with SHT_RELR sections enabled. relocation_packer was saving 11,382,784 bytes (no_pack - base). SHT_RELR sections are saving 10,539,008 bytes (no_pack - sht_relr). Bug: None Test: Built aosp_marlin-userdebug image, boots on device. Test: Built aosp_x86_64-userdebug image, boots in emulator. Change-Id: Ic753abecb77863c64996157c543c344e66f0f4dd --- core/dynamic_binary.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/dynamic_binary.mk b/core/dynamic_binary.mk index ebbe71c2d..8cd23e14b 100644 --- a/core/dynamic_binary.mk +++ b/core/dynamic_binary.mk @@ -67,6 +67,14 @@ ifneq ($(HOST_OS),linux) my_pack_module_relocations := false endif +# Disable relocation_packer and migrate to SHT_RELR sections. +# +# Proposal for adding SHT_RELR sections in generic-abi is at +# https://groups.google.com/forum/#!topic/generic-abi/bX460iggiKg +# +# TODO: Remove relocation_packer and associated build logic. +my_pack_module_relocations := false + ifeq (true,$(my_pack_module_relocations)) # Pack relocations $(relocation_packer_output): $(relocation_packer_input)