Lines Matching refs:Config
55 static Error removeSections(const CommonConfig &Config, Object &Obj) {
60 if (!Config.ToRemove.empty()) {
61 RemovePred = [&Config, RemovePred](const std::unique_ptr<Section> &Sec) {
62 return Config.ToRemove.matches(Sec->CanonicalName);
66 if (Config.StripAll || Config.StripDebug) {
76 if (!Config.OnlySection.empty()) {
78 RemovePred = [&Config](const std::unique_ptr<Section> &Sec) {
79 return !Config.OnlySection.matches(Sec->CanonicalName);
93 static void updateAndRemoveSymbols(const CommonConfig &Config,
102 (Config.Weaken || Config.SymbolsToWeaken.matches(Sym.Name)))
105 auto I = Config.SymbolsToRename.find(Sym.Name);
106 if (I != Config.SymbolsToRename.end())
110 auto RemovePred = [&Config, &MachOConfig,
118 if (Config.StripAll)
120 if (Config.DiscardMode == DiscardType::All && !(N->n_type & MachO::N_EXT))
123 if (Config.StripDebug && (N->n_type & MachO::N_STAB))
403 static Error handleArgs(const CommonConfig &Config,
406 for (StringRef Flag : Config.DumpSection) {
414 if (Error E = removeSections(Config, Obj))
418 if (Config.StripAll)
419 markSymbols(Config, Obj);
421 updateAndRemoveSymbols(Config, MachOConfig, Obj);
423 if (Config.StripAll)
428 for (const NewSectionInfo &NewSection : Config.AddSection) {
435 for (const NewSectionInfo &NewSection : Config.UpdateSection) {
448 Error objcopy::macho::executeObjcopyOnBinary(const CommonConfig &Config,
455 return createFileError(Config.InputFilename, O.takeError());
460 Config.InputFilename.str().c_str());
462 if (Error E = handleArgs(Config, MachOConfig, **O))
463 return createFileError(Config.InputFilename, std::move(E));
479 sys::path::filename(Config.OutputFilename), PageSize, Out);
486 const MultiFormatConfig &Config, const MachOUniversalBinary &In,
494 createNewArchiveMembers(Config, **ArOrErr);
505 Kind, Config.getCommonConfig().DeterministicArchives,
534 Config.getCommonConfig().InputFilename.str().c_str());
541 Expected<const MachOConfig &> MachO = Config.getMachOConfig();
545 if (Error E = executeObjcopyOnBinary(Config.getCommonConfig(), *MachO,