Exit failure if trying to load non-PIE.
Amazingly this was actually breaking the NDK's ability to build
libstdc++ for x86.
Test: mma
Bug: None
Change-Id: Iafa55c31fdeb35caca7d7d7a39a3e7afa0713557
diff --git a/linker/linker_main.cpp b/linker/linker_main.cpp
index 9ed7505..7634465 100644
--- a/linker/linker_main.cpp
+++ b/linker/linker_main.cpp
@@ -321,7 +321,7 @@
"\"%s\": error: Android 5.0 and later only support "
"position-independent executables (-fPIE).\n",
g_argv[0]);
- exit(0);
+ exit(EXIT_FAILURE);
}
// Use LD_LIBRARY_PATH and LD_PRELOAD (but only if we aren't setuid/setgid).