We only support relocation packing inside lld now, remove calls to the standalone relocation packer. Any shared library built with LOCAL_USE_CLANG_LLD := false will no longer have relocation packing. This will also prevent relocation packing on prebuilt shared libraries. Also enables relocation packing on Darwin since lld will work on Darwin. Bug: 110715614 Test: m checkbuild Change-Id: Ib4d4bc86f164d05dd78455c8e7605d4b4f5a2a77
35 lines
1.2 KiB
Makefile
35 lines
1.2 KiB
Makefile
#############################################################
|
|
## Set up my_pack_module_relocations
|
|
## Input variables:
|
|
## DISABLE_RELOCATION_PACKER,
|
|
## LOCAL_PACK_MODULE_RELOCATIONS*,
|
|
## *TARGET_PACK_MODULE_RELOCATIONS,
|
|
## LOCAL_MODULE_CLASS, HOST_OS
|
|
## LOCAL_IS_HOST_MODULE
|
|
## Output variables:
|
|
## my_pack_module_relocations, if false skip relocation_packer
|
|
#############################################################
|
|
|
|
my_pack_module_relocations := false
|
|
ifneq ($(DISABLE_RELOCATION_PACKER),true)
|
|
my_pack_module_relocations := $(firstword \
|
|
$(LOCAL_PACK_MODULE_RELOCATIONS_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) \
|
|
$(LOCAL_PACK_MODULE_RELOCATIONS))
|
|
endif
|
|
|
|
ifeq ($(my_pack_module_relocations),)
|
|
my_pack_module_relocations := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_PACK_MODULE_RELOCATIONS)
|
|
endif
|
|
|
|
# Do not pack relocations for executables. Because packing results in
|
|
# non-zero p_vaddr which causes kernel to load executables to lower
|
|
# address (starting at 0x8000) http://b/20665974
|
|
ifeq ($(filter SHARED_LIBRARIES,$(LOCAL_MODULE_CLASS)),)
|
|
my_pack_module_relocations := false
|
|
endif
|
|
|
|
ifdef LOCAL_IS_HOST_MODULE
|
|
# Do not pack relocations on host modules
|
|
my_pack_module_relocations := false
|
|
endif
|