diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-11-08 14:48:47 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-11-08 14:48:47 +0000 |
commit | 94c8022573b2f7da5124558a8d0597b0e8fbb381 (patch) | |
tree | f7db95192ddf6d7bd532e377361c61087705732c /lib/Driver/ToolChains.cpp | |
parent | 1ddb02cabd4374bcbe9afdff5123be0be8e32d12 (diff) |
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
Diffstat (limited to 'lib/Driver/ToolChains.cpp')
-rw-r--r-- | lib/Driver/ToolChains.cpp | 6 |
1 files 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"); |