Merge "Pass -z {relro,now,noexecstack} in ABCCompilerDriver."
diff --git a/lib/AndroidBitcode/ABCCompilerDriver.cpp b/lib/AndroidBitcode/ABCCompilerDriver.cpp
index 5be45ec..1e5e906 100644
--- a/lib/AndroidBitcode/ABCCompilerDriver.cpp
+++ b/lib/AndroidBitcode/ABCCompilerDriver.cpp
@@ -117,6 +117,11 @@
// -Bsymbolic.
mLinkerConfig->setBsymbolic(true);
+ // Set kRelro for -z relro
+ // Not set kExecStack for -z noexecstack
+ // Not set kLazy for -z now
+ mLinkerConfig->setZOption(LinkerConfig::kRelro);
+
// Config the linker.
Linker::ErrorCode result = mLinker.config(*mLinkerConfig);
if (result != Linker::kSuccess) {