summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mk/vars.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/mk/vars.mk b/mk/vars.mk
index ffd729ff4..014017ee8 100644
--- a/mk/vars.mk
+++ b/mk/vars.mk
@@ -85,6 +85,8 @@ TARGET_LDFLAGS:= -L$(STAGING_TARGET_DIR)/lib -L$(STAGING_TARGET_DIR)/usr/lib \
-Wl,-O2 -Wl,-rpath -Wl,/usr/lib \
-Wl,-rpath-link -Wl,${STAGING_TARGET_DIR}/usr/lib \
$(ADK_TARGET_ABI_LDFLAGS) $(TARGET_CFLAGS_ARCH)
+# security optimization, see http://www.akkadia.org/drepper/dsohowto.pdf
+TARGET_LDFLAGS+= -Wl,-z,relro,-z,now
ifneq ($(ADK_NATIVE),)
TARGET_CPPFLAGS:=