diff options
-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; |