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