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