arm: turn on -Wl,--fatal-warnings
In b238210c0172e771b1302364273016ad1fabafb8, we added
-Wl,--warn-shared-textrel to TARGET_GLOBAL_LDFLAGS. This generated
a warning whenever we created a shared library with a text
relocation. At the time, we wrote:
=====
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)
=====
We've successfully removed all text relocations from Android's
compiled code, so turn on -Wl,--fatal-warnings .
Some pre-compiled shared libraries continue to have text relocations,
but they will be unaffected by this change.
Change-Id: I505ea23120048afc45f62593704fe1d6d26a352c
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk
index 854037d..4aa8576 100644
--- a/core/combo/TARGET_linux-arm.mk
+++ b/core/combo/TARGET_linux-arm.mk
@@ -138,6 +138,7 @@
-Wl,-z,relro \
-Wl,-z,now \
-Wl,--warn-shared-textrel \
+ -Wl,--fatal-warnings \
-Wl,--icf=safe \
$(arch_variant_ldflags)