Remove execute-only support.

With kernel support being removed for execute-only memory layouts,
remove support for XOM until there's kernel support again.

This allows us to gain the code-size improvements from
"-z noseparate-code".

Bug: 147300048
Test: Compiled binaries no longer marked XOM by default.

Change-Id: I08a054e903b202f513d3b3381afd606bb87cf257
This commit is contained in:
Ivan Lozano 2020-02-11 09:15:39 -05:00
parent 0445b496c1
commit 3cd1ebeaee
4 changed files with 0 additions and 31 deletions

View file

@ -90,32 +90,6 @@ ifneq (,$(filter $(addsuffix %,$(ALLOWED_MANUAL_INTERFACE_PATHS)),$(LOCAL_PATH))
my_cflags += -DDO_NOT_CHECK_MANUAL_BINDER_INTERFACES
endif
ifneq ($(strip $(ENABLE_XOM)),false)
ifndef LOCAL_IS_HOST_MODULE
my_xom := true
# Disable XOM in excluded paths.
combined_xom_exclude_paths := $(XOM_EXCLUDE_PATHS) \
$(PRODUCT_XOM_EXCLUDE_PATHS)
ifneq ($(strip $(foreach dir,$(subst $(comma),$(space),$(combined_xom_exclude_paths)),\
$(filter $(dir)%,$(LOCAL_PATH)))),)
my_xom := false
endif
# Allow LOCAL_XOM to override the above
ifdef LOCAL_XOM
my_xom := $(LOCAL_XOM)
endif
ifeq ($(strip $(my_xom)),true)
ifeq (arm64,$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH))
ifeq ($(my_use_clang_lld),true)
my_ldflags += -Wl,--execute-only -Wl,-z,separate-code
endif
endif
endif
endif
endif
my_allow_undefined_symbols := $(strip $(LOCAL_ALLOW_UNDEFINED_SYMBOLS))
ifdef SANITIZE_HOST
ifdef LOCAL_IS_HOST_MODULE

View file

@ -314,7 +314,6 @@ LOCAL_VTS_INCLUDES:=
LOCAL_VTS_MODE:=
LOCAL_WARNINGS_ENABLE:=
LOCAL_WHOLE_STATIC_LIBRARIES:=
LOCAL_XOM:=
LOCAL_YACCFLAGS:=
LOCAL_CHECK_ELF_FILES:=
# TODO: deprecate, it does nothing

View file

@ -350,8 +350,6 @@ _product_list_vars += PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS
# system.img), so devices need to install the package in a system-only OTA manner.
_product_single_value_vars += PRODUCT_BUILD_GENERIC_OTA_PACKAGE
# Whether any paths are excluded from being set XOM when ENABLE_XOM=true
_product_list_vars += PRODUCT_XOM_EXCLUDE_PATHS
_product_list_vars += PRODUCT_MANIFEST_PACKAGE_NAME_OVERRIDES
_product_list_vars += PRODUCT_PACKAGE_NAME_OVERRIDES
_product_list_vars += PRODUCT_CERTIFICATE_OVERRIDES

View file

@ -101,8 +101,6 @@ $(call add_json_bool, Safestack, $(filter true,$(USE_SAF
$(call add_json_bool, EnableCFI, $(call invert_bool,$(filter false,$(ENABLE_CFI))))
$(call add_json_list, CFIExcludePaths, $(CFI_EXCLUDE_PATHS) $(PRODUCT_CFI_EXCLUDE_PATHS))
$(call add_json_list, CFIIncludePaths, $(CFI_INCLUDE_PATHS) $(PRODUCT_CFI_INCLUDE_PATHS))
$(call add_json_bool, EnableXOM, $(call invert_bool,$(filter false,$(ENABLE_XOM))))
$(call add_json_list, XOMExcludePaths, $(XOM_EXCLUDE_PATHS) $(PRODUCT_XOM_EXCLUDE_PATHS))
$(call add_json_list, IntegerOverflowExcludePaths, $(INTEGER_OVERFLOW_EXCLUDE_PATHS) $(PRODUCT_INTEGER_OVERFLOW_EXCLUDE_PATHS))
$(call add_json_bool, Experimental_mte, $(filter true,$(TARGET_EXPERIMENTAL_MTE)))