Index: ELF/Config.h =================================================================== --- ELF/Config.h +++ ELF/Config.h @@ -34,6 +34,7 @@ bool ExportDynamic; bool NoInhibitExec; bool NoUndefined; + bool Now = false; bool Shared; bool Static = false; bool WholeArchive = false; Index: ELF/Driver.cpp =================================================================== --- ELF/Driver.cpp +++ ELF/Driver.cpp @@ -135,6 +135,15 @@ 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->Now = true; + else { + warning(Twine("ignoring unknown argument for -z: ") + Opt); + } + } + for (auto *Arg : Args) { switch (Arg->getOption().getID()) { case OPT_l: Index: ELF/Options.td =================================================================== --- ELF/Options.td +++ ELF/Options.td @@ -73,6 +73,9 @@ def whole_archive : Flag<["--"], "whole-archive">, HelpText<"Force load of all members in a static library">; +def z : Separate<["-"], "z">, MetaVarName<"