diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-03-18 16:36:57 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-03-18 16:36:57 +0000 |
commit | fa2bd37d2e6baa31b6e59c299cf8f4062b041343 (patch) | |
tree | b9f890be128e7d786ecec65fc5a999dbf53cfd5f | |
parent | 01c3dc5e35e6073dc5dbd956c9964d86866fdbf2 (diff) |
Add support for -znodlopen.
ok patrick@
-rw-r--r-- | gnu/llvm/tools/lld/ELF/Config.h | 1 | ||||
-rw-r--r-- | gnu/llvm/tools/lld/ELF/Driver.cpp | 1 | ||||
-rw-r--r-- | gnu/llvm/tools/lld/ELF/SyntheticSections.cpp | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/gnu/llvm/tools/lld/ELF/Config.h b/gnu/llvm/tools/lld/ELF/Config.h index b7706205a5b..f58e3e5715b 100644 --- a/gnu/llvm/tools/lld/ELF/Config.h +++ b/gnu/llvm/tools/lld/ELF/Config.h @@ -135,6 +135,7 @@ struct Configuration { bool ZCombreloc; bool ZExecstack; bool ZNodelete; + bool ZNodlopen; bool ZNow; bool ZOrigin; bool ZRelro; diff --git a/gnu/llvm/tools/lld/ELF/Driver.cpp b/gnu/llvm/tools/lld/ELF/Driver.cpp index c6e69c5bb4b..3cf88e3c1ca 100644 --- a/gnu/llvm/tools/lld/ELF/Driver.cpp +++ b/gnu/llvm/tools/lld/ELF/Driver.cpp @@ -537,6 +537,7 @@ void LinkerDriver::readConfigs(opt::InputArgList &Args) { 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"); diff --git a/gnu/llvm/tools/lld/ELF/SyntheticSections.cpp b/gnu/llvm/tools/lld/ELF/SyntheticSections.cpp index b673a4ece1d..d1b6755ab2c 100644 --- a/gnu/llvm/tools/lld/ELF/SyntheticSections.cpp +++ b/gnu/llvm/tools/lld/ELF/SyntheticSections.cpp @@ -816,6 +816,8 @@ template <class ELFT> void DynamicSection<ELFT>::addEntries() { 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; |