Lines Matching defs:Config

157 static Error handleArgs(const CommonConfig &Config,
159 for (StringRef Op : Config.DumpSection) {
166 Obj.removeSections([&Config](const Section &Sec) {
169 if (!Config.OnlySection.empty() && !Config.OnlySection.matches(Sec.Name))
172 if (Config.StripDebug || Config.StripAll || Config.StripAllGNU ||
173 Config.DiscardMode == DiscardType::All || Config.StripUnneeded) {
179 if (Config.ToRemove.matches(Sec.Name))
185 if (Config.OnlyKeepDebug) {
204 if (Config.StripAll || Config.StripAllGNU)
209 if (Config.StripUnneeded || Config.DiscardMode == DiscardType::All ||
210 !Config.SymbolsToRemove.empty())
215 auto I = Config.SymbolsToRename.find(Sym.Name);
216 if (I != Config.SymbolsToRename.end())
223 if (Config.StripAll || Config.StripAllGNU)
226 if (Config.SymbolsToRemove.matches(Sym.Name)) {
231 "'" + Config.OutputFilename + "': not stripping symbol '" +
243 if (Config.StripUnneeded ||
244 Config.UnneededSymbolsToRemove.matches(Sym.Name))
250 if (Config.DiscardMode == DiscardType::All &&
263 if (!Config.SetSectionFlags.empty())
265 const auto It = Config.SetSectionFlags.find(Sec.Name);
266 if (It != Config.SetSectionFlags.end())
271 for (const NewSectionInfo &NewSection : Config.AddSection) {
273 const auto It = Config.SetSectionFlags.find(NewSection.SectionName);
274 if (It != Config.SetSectionFlags.end())
286 for (const NewSectionInfo &NewSection : Config.UpdateSection) {
308 if (!Config.AddGnuDebugLink.empty())
309 if (Error E = addGnuDebugLink(Obj, Config.AddGnuDebugLink))
317 "'" + Config.OutputFilename +
330 Error executeObjcopyOnBinary(const CommonConfig &Config,
336 return createFileError(Config.InputFilename, ObjOrErr.takeError());
339 if (Error E = handleArgs(Config, COFFConfig, *Obj))
340 return createFileError(Config.InputFilename, std::move(E));
343 return createFileError(Config.OutputFilename, std::move(E));