Explicitly add lld's relr relocation flags for Android Pie and above
Bug: http://b/119086751 https://android-review.googlesource.com/c/837025 disabled lld relocation packing globally and enabled it for soong modules targeting pie and above. Turn it on for Android.mk modules as well. Test: grep for -Wl,pack-dyn-relocs=android in out/build-aosp_<device>.ninja Change-Id: I81b8625073aa6b364219b8cf3122b69c95ec7589
This commit is contained in:
@@ -32,3 +32,12 @@ ifdef LOCAL_IS_HOST_MODULE
|
||||
# Do not pack relocations on host modules
|
||||
my_pack_module_relocations := false
|
||||
endif
|
||||
|
||||
# Lld relocation packing cannot be enabled for binaries before Android Pie.
|
||||
ifneq ($(LOCAL_SDK_VERSION),)
|
||||
ifneq ($(LOCAL_SDK_VERSION),current)
|
||||
ifeq ($(call math_lt,$(LOCAL_SDK_VERSION),28),true)
|
||||
my_pack_module_relocations := false
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
Reference in New Issue
Block a user