Index: lld/trunk/ELF/Config.h =================================================================== --- lld/trunk/ELF/Config.h +++ lld/trunk/ELF/Config.h @@ -44,6 +44,7 @@ bool ExportDynamic; bool NoInhibitExec; bool NoUndefined; + bool ZNow = false; bool Shared; bool Static = false; bool WholeArchive = false; Index: lld/trunk/ELF/Driver.cpp =================================================================== --- lld/trunk/ELF/Driver.cpp +++ lld/trunk/ELF/Driver.cpp @@ -186,6 +186,11 @@ Config->NoUndefined = Args.hasArg(OPT_no_undefined); Config->Shared = Args.hasArg(OPT_shared); + for (auto *Arg : Args.filtered(OPT_z)) { + if (Arg->getValue() == StringRef("now")) + Config->ZNow = true; + } + for (auto *Arg : Args) { switch (Arg->getOption().getID()) { case OPT_l: Index: lld/trunk/ELF/Options.td =================================================================== --- lld/trunk/ELF/Options.td +++ lld/trunk/ELF/Options.td @@ -82,6 +82,9 @@ def whole_archive : Flag<["--"], "whole-archive">, HelpText<"Force load of all members in a static library">; +def z : JoinedOrSeparate<["-"], "z">, MetaVarName<"