Index: ELF/Driver.cpp =================================================================== --- ELF/Driver.cpp +++ ELF/Driver.cpp @@ -304,6 +304,9 @@ for (StringRef S : Config->Undefined) Symtab.addUndefinedOpt(S); + for (auto *Arg : Args.filtered(OPT_wrap)) + Symtab.wrap(Arg->getValue()); + if (Config->OutputFile.empty()) Config->OutputFile = "a.out"; Index: ELF/Options.td =================================================================== --- ELF/Options.td +++ ELF/Options.td @@ -109,6 +109,9 @@ def whole_archive : Flag<["--", "-"], "whole-archive">, HelpText<"Force load of all members in a static library">; +def wrap : Separate<["--", "-"], "wrap">, MetaVarName<"">, + HelpText<"Use wrapper functions for symbol">; + def z : JoinedOrSeparate<["-"], "z">, MetaVarName<"