[lld] r303455 - Merging r298567:
Brad Smith via llvm-commits
llvm-commits at lists.llvm.org
Fri May 19 13:47:29 PDT 2017
Author: brad
Date: Fri May 19 15:47:28 2017
New Revision: 303455
URL: http://llvm.org/viewvc/llvm-project?rev=303455&view=rev
Log:
Merging r298567:
------------------------------------------------------------------------
r298567 | davide | 2017-03-22 20:54:16 -0400 (Wed, 22 Mar 2017) | 3 lines
[ELF] Add -z nodlopen option.
Patch by Mark Kettenis.
------------------------------------------------------------------------
Modified:
lld/branches/release_40/ELF/Config.h
lld/branches/release_40/ELF/Driver.cpp
lld/branches/release_40/ELF/SyntheticSections.cpp
lld/branches/release_40/test/ELF/dt_flags.s
Modified: lld/branches/release_40/ELF/Config.h
URL: http://llvm.org/viewvc/llvm-project/lld/branches/release_40/ELF/Config.h?rev=303455&r1=303454&r2=303455&view=diff
==============================================================================
--- lld/branches/release_40/ELF/Config.h (original)
+++ lld/branches/release_40/ELF/Config.h Fri May 19 15:47:28 2017
@@ -135,6 +135,7 @@ struct Configuration {
bool ZCombreloc;
bool ZExecstack;
bool ZNodelete;
+ bool ZNodlopen;
bool ZNow;
bool ZOrigin;
bool ZRelro;
Modified: lld/branches/release_40/ELF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/branches/release_40/ELF/Driver.cpp?rev=303455&r1=303454&r2=303455&view=diff
==============================================================================
--- lld/branches/release_40/ELF/Driver.cpp (original)
+++ lld/branches/release_40/ELF/Driver.cpp Fri May 19 15:47:28 2017
@@ -548,6 +548,7 @@ void LinkerDriver::readConfigs(opt::Inpu
Config->ZCombreloc = !hasZOption(Args, "nocombreloc");
Config->ZExecstack = hasZOption(Args, "execstack");
Config->ZNodelete = hasZOption(Args, "nodelete");
+ Config->ZNodlopen = hasZOption(Args, "nodlopen");
Config->ZNow = hasZOption(Args, "now");
Config->ZOrigin = hasZOption(Args, "origin");
Config->ZRelro = !hasZOption(Args, "norelro");
Modified: lld/branches/release_40/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/branches/release_40/ELF/SyntheticSections.cpp?rev=303455&r1=303454&r2=303455&view=diff
==============================================================================
--- lld/branches/release_40/ELF/SyntheticSections.cpp (original)
+++ lld/branches/release_40/ELF/SyntheticSections.cpp Fri May 19 15:47:28 2017
@@ -816,6 +816,8 @@ template <class ELFT> void DynamicSectio
DtFlags |= DF_SYMBOLIC;
if (Config->ZNodelete)
DtFlags1 |= DF_1_NODELETE;
+ if (Config->ZNodlopen)
+ DtFlags1 |= DF_1_NOOPEN;
if (Config->ZNow) {
DtFlags |= DF_BIND_NOW;
DtFlags1 |= DF_1_NOW;
Modified: lld/branches/release_40/test/ELF/dt_flags.s
URL: http://llvm.org/viewvc/llvm-project/lld/branches/release_40/test/ELF/dt_flags.s?rev=303455&r1=303454&r2=303455&view=diff
==============================================================================
--- lld/branches/release_40/test/ELF/dt_flags.s (original)
+++ lld/branches/release_40/test/ELF/dt_flags.s Fri May 19 15:47:28 2017
@@ -2,19 +2,19 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
# RUN: ld.lld -shared %t -o %t.so
-# RUN: ld.lld -z now -z nodelete -z origin -Bsymbolic %t %t.so -o %t1
+# RUN: ld.lld -z now -z nodelete -z nodlopen -z origin -Bsymbolic %t %t.so -o %t1
# RUN: ld.lld %t %t.so -o %t2
# RUN: llvm-readobj -dynamic-table %t1 | FileCheck -check-prefix=FLAGS %s
# RUN: llvm-readobj -dynamic-table %t2 | FileCheck %s
# FLAGS: DynamicSection [
# FLAGS: 0x000000000000001E FLAGS ORIGIN SYMBOLIC BIND_NOW
-# FLAGS: 0x000000006FFFFFFB FLAGS_1 NOW NODELETE ORIGIN
+# FLAGS: 0x000000006FFFFFFB FLAGS_1 NOW NODELETE NOOPEN ORIGIN
# FLAGS: ]
# CHECK: DynamicSection [
# CHECK-NOT: 0x000000000000001E FLAGS ORIGIN SYMBOLIC BIND_NOW
-# CHECK-NOT: 0x000000006FFFFFFB FLAGS_1 NOW NODELETE ORIGIN
+# CHECK-NOT: 0x000000006FFFFFFB FLAGS_1 NOW NODELETE NOOPEN ORIGIN
# CHECK: ]
.globl _start
More information about the llvm-commits
mailing list