From 94c8022573b2f7da5124558a8d0597b0e8fbb381 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 8 Nov 2010 14:48:47 +0000 Subject: [PATCH] Pass "-z relro" as two arguments. This works with both gnu ld and gold. Patch by Frits van Bommel. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118406 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/ToolChains.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 57743e59a5..6a15666362 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -1360,8 +1360,10 @@ Linux::Linux(const HostInfo &Host, const llvm::Triple& Triple) LinuxDistro Distro = DetectLinuxDistro(Arch); - if (IsUbuntu(Distro)) - ExtraOpts.push_back("-z relro"); + if (IsUbuntu(Distro)) { + ExtraOpts.push_back("-z"); + ExtraOpts.push_back("relro"); + } if (Arch == llvm::Triple::arm) ExtraOpts.push_back("-X"); -- 2.50.1