From 4f2f16da143fede94a1124ee79efccee78442b90 Mon Sep 17 00:00:00 2001 From: Nick Kralevich Date: Fri, 19 Oct 2012 13:36:49 -0700 Subject: [PATCH] x86: add --warn-shared-textrel Emit a warning when the static linker detects a shared library has text relocations. Text relocations make it harder to share pages across processes, and make it harder to use certain memory protection features in, for example, SELinux. This warning will turn into an error in a future change (via --fatal-warnings) Change-Id: I2d169c7ce3600d02e25591f3ec15aba363730298 References: http://www.akkadia.org/drepper/textrelocs.html --- core/combo/TARGET_linux-x86.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/core/combo/TARGET_linux-x86.mk b/core/combo/TARGET_linux-x86.mk index 9a6e08e231..07424b570c 100644 --- a/core/combo/TARGET_linux-x86.mk +++ b/core/combo/TARGET_linux-x86.mk @@ -141,6 +141,7 @@ TARGET_GLOBAL_LDFLAGS += -m32 TARGET_GLOBAL_LDFLAGS += -Wl,-z,noexecstack TARGET_GLOBAL_LDFLAGS += -Wl,-z,relro -Wl,-z,now +TARGET_GLOBAL_LDFLAGS += -Wl,--warn-shared-textrel TARGET_GLOBAL_LDFLAGS += -Wl,--gc-sections TARGET_C_INCLUDES := \