am 60e3a5ac: Merge "enable PIE for dynamically linked executables"
* commit '60e3a5acbe8ab2819682cb0ae05de8db17ae3c36':
enable PIE for dynamically linked executables
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk
index 8c89143..09b2619 100644
--- a/core/combo/TARGET_linux-arm.mk
+++ b/core/combo/TARGET_linux-arm.mk
@@ -102,7 +102,7 @@
arch_include_dir := $(dir $(android_config_h))
TARGET_GLOBAL_CFLAGS += \
- -msoft-float -fpic \
+ -msoft-float -fpic -fPIE \
-ffunction-sections \
-fdata-sections \
-funwind-tables \
@@ -266,7 +266,7 @@
endef
define transform-o-to-executable-inner
-$(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic -Wl,-T,$(BUILD_SYSTEM)/armelf.x \
+$(hide) $(PRIVATE_CXX) -nostdlib -Bdynamic -fPIE -pie \
-Wl,-dynamic-linker,/system/bin/linker \
-Wl,--gc-sections \
-Wl,-z,nocopyreloc \