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
97 auto I = Config.SymbolsToRename.find(Sym.Name); in updateAndRemoveSymbols()
98 if (I != Config.SymbolsToRename.end()) in updateAndRemoveSymbols()
102 auto RemovePred = [&Config, &MachOConfig, in updateAndRemoveSymbols()
110 if (Config.StripAll) in updateAndRemoveSymbols()
112 if (Config.DiscardMode == DiscardType::All && !(N->n_type & MachO::N_EXT)) in updateAndRemoveSymbols()
392 static Error handleArgs(const CommonConfig &Config, in handleArgs() argument
395 for (StringRef Flag : Config.DumpSection) { in handleArgs()
403 if (Error E = removeSections(Config, Obj)) in handleArgs()
407 if (Config.StripAll) in handleArgs()
408 markSymbols(Config, Obj); in handleArgs()
410 updateAndRemoveSymbols(Config, MachOConfig, Obj); in handleArgs()
412 if (Config.StripAll) in handleArgs()
417 for (const NewSectionInfo &NewSection : Config.AddSection) { in handleArgs()
424 for (const NewSectionInfo &NewSection : Config.UpdateSection) { in handleArgs()
437 Error objcopy::macho::executeObjcopyOnBinary(const CommonConfig &Config, in executeObjcopyOnBinary() argument
444 return createFileError(Config.InputFilename, O.takeError()); in executeObjcopyOnBinary()
449 Config.InputFilename.str().c_str()); in executeObjcopyOnBinary()
451 if (Error E = handleArgs(Config, MachOConfig, **O)) in executeObjcopyOnBinary()
452 return createFileError(Config.InputFilename, std::move(E)); in executeObjcopyOnBinary()
468 sys::path::filename(Config.OutputFilename), PageSize, Out); in executeObjcopyOnBinary()
475 const MultiFormatConfig &Config, const MachOUniversalBinary &In, in executeObjcopyOnMachOUniversalBinary() argument
483 createNewArchiveMembers(Config, **ArOrErr); in executeObjcopyOnMachOUniversalBinary()
492 Config.getCommonConfig().DeterministicArchives, in executeObjcopyOnMachOUniversalBinary()
521 Config.getCommonConfig().InputFilename.str().c_str()); in executeObjcopyOnMachOUniversalBinary()
528 Expected<const MachOConfig &> MachO = Config.getMachOConfig(); in executeObjcopyOnMachOUniversalBinary()
532 if (Error E = executeObjcopyOnBinary(Config.getCommonConfig(), *MachO, in executeObjcopyOnMachOUniversalBinary()