Lines Matching refs:Config
134 static Error handleArgs(const CommonConfig &Config, Object &Obj) {
136 Obj.removeSections([&Config](const Section &Sec) {
139 if (!Config.OnlySection.empty() && !Config.OnlySection.matches(Sec.Name))
142 if (Config.StripDebug || Config.StripAll || Config.StripAllGNU ||
143 Config.DiscardMode == DiscardType::All || Config.StripUnneeded) {
149 if (Config.ToRemove.matches(Sec.Name))
155 if (Config.OnlyKeepDebug) {
166 if (Config.StripAll || Config.StripAllGNU)
171 if (Config.StripUnneeded || Config.DiscardMode == DiscardType::All ||
172 !Config.SymbolsToRemove.empty())
177 auto I = Config.SymbolsToRename.find(Sym.Name);
178 if (I != Config.SymbolsToRename.end())
185 if (Config.StripAll || Config.StripAllGNU)
188 if (Config.SymbolsToRemove.matches(Sym.Name)) {
193 "'" + Config.OutputFilename + "': not stripping symbol '" +
205 if (Config.StripUnneeded ||
206 Config.UnneededSymbolsToRemove.matches(Sym.Name))
212 if (Config.DiscardMode == DiscardType::All &&
225 if (!Config.SetSectionFlags.empty())
227 const auto It = Config.SetSectionFlags.find(Sec.Name);
228 if (It != Config.SetSectionFlags.end())
232 for (const auto &Flag : Config.AddSection) {
248 if (!Config.AddGnuDebugLink.empty())
249 if (Error E = addGnuDebugLink(Obj, Config.AddGnuDebugLink))
255 Error executeObjcopyOnBinary(const CommonConfig &Config, const COFFConfig &,
260 return createFileError(Config.InputFilename, ObjOrErr.takeError());
263 if (Error E = handleArgs(Config, *Obj))
264 return createFileError(Config.InputFilename, std::move(E));
267 return createFileError(Config.OutputFilename, std::move(E));