Home | History | Annotate | Download | only in core
      1 #############################################################
      2 ## Set up my_pack_module_relocations
      3 ## Input variables:
      4 ##   DISABLE_RELOCATION_PACKER,
      5 ##   LOCAL_PACK_MODULE_RELOCATIONS*,
      6 ##   *TARGET_PACK_MODULE_RELOCATIONS,
      7 ##   LOCAL_MODULE_CLASS, HOST_OS
      8 ##   LOCAL_IS_HOST_MODULE
      9 ## Output variables:
     10 ##   my_pack_module_relocations, if false skip relocation_packer
     11 #############################################################
     12 
     13 my_pack_module_relocations := false
     14 ifneq ($(DISABLE_RELOCATION_PACKER),true)
     15   my_pack_module_relocations := $(firstword \
     16     $(LOCAL_PACK_MODULE_RELOCATIONS_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) \
     17     $(LOCAL_PACK_MODULE_RELOCATIONS))
     18 endif
     19 
     20 ifeq ($(my_pack_module_relocations),)
     21   my_pack_module_relocations := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_PACK_MODULE_RELOCATIONS)
     22 endif
     23 
     24 # Do not pack relocations for executables. Because packing results in
     25 # non-zero p_vaddr which causes kernel to load executables to lower
     26 # address (starting at 0x8000) http://b/20665974
     27 ifeq ($(filter SHARED_LIBRARIES,$(LOCAL_MODULE_CLASS)),)
     28   my_pack_module_relocations := false
     29 endif
     30 
     31 ifdef LOCAL_IS_HOST_MODULE
     32   # Do not pack relocations on host modules
     33   my_pack_module_relocations := false
     34 endif
     35