Lines Matching refs:Obj

65 static bool onlyKeepDWOPred(const Object &Obj, const SectionBase &Sec) {  in onlyKeepDWOPred()  argument
67 if (&Sec == Obj.SectionNames) in onlyKeepDWOPred()
96 Object &Obj, Buffer &Buf, in createWriter() argument
99 return llvm::make_unique<BinaryWriter>(Obj, Buf); in createWriter()
104 return llvm::make_unique<ELFWriter<ELF32LE>>(Obj, Buf, in createWriter()
107 return llvm::make_unique<ELFWriter<ELF64LE>>(Obj, Buf, in createWriter()
110 return llvm::make_unique<ELFWriter<ELF32BE>>(Obj, Buf, in createWriter()
113 return llvm::make_unique<ELFWriter<ELF64BE>>(Obj, Buf, in createWriter()
185 Object &Obj) { in dumpSectionToFile() argument
186 for (auto &Sec : Obj.sections()) { in dumpSectionToFile()
223 const CopyConfig &Config, Object &Obj, SectionPred &RemovePred, in replaceDebugSections() argument
228 for (auto &Sec : Obj.sections()) { in replaceDebugSections()
260 static void handleArgs(const CopyConfig &Config, Object &Obj, in handleArgs() argument
267 Obj.Machine = Config.OutputArch.getValue().EMachine; in handleArgs()
271 if (Obj.SymbolTable) { in handleArgs()
272 Obj.SymbolTable->updateSymbols([&](Symbol &Sym) { in handleArgs()
318 for (auto &Section : Obj.sections()) in handleArgs()
322 Obj.removeSymbols([&](const Symbol &Sym) { in handleArgs()
362 RemovePred = [RemovePred, &Obj](const SectionBase &Sec) { in handleArgs()
363 return onlyKeepDWOPred(Obj, Sec) || RemovePred(Sec); in handleArgs()
367 RemovePred = [RemovePred, &Obj](const SectionBase &Sec) { in handleArgs()
372 if (&Sec == Obj.SectionNames) in handleArgs()
397 RemovePred = [RemovePred, &Obj](const SectionBase &Sec) { in handleArgs()
400 if (&Sec == Obj.SectionNames) in handleArgs()
406 RemovePred = [RemovePred, &Obj](const SectionBase &Sec) { in handleArgs()
409 if (&Sec == Obj.SectionNames) in handleArgs()
418 RemovePred = [&Config, RemovePred, &Obj](const SectionBase &Sec) { in handleArgs()
428 if (Obj.SectionNames == &Sec) in handleArgs()
430 if (Obj.SymbolTable == &Sec || in handleArgs()
431 (Obj.SymbolTable && Obj.SymbolTable->getStrTab() == &Sec)) in handleArgs()
455 Obj.SymbolTable && !Obj.SymbolTable->empty()) { in handleArgs()
456 RemovePred = [&Obj, RemovePred](const SectionBase &Sec) { in handleArgs()
457 if (&Sec == Obj.SymbolTable || &Sec == Obj.SymbolTable->getStrTab()) in handleArgs()
464 replaceDebugSections(Config, Obj, RemovePred, isCompressable, in handleArgs()
465 [&Config, &Obj](const SectionBase *S) { in handleArgs()
466 return &Obj.addSection<CompressedSection>( in handleArgs()
471 Config, Obj, RemovePred, in handleArgs()
473 [&Obj](const SectionBase *S) { in handleArgs()
475 return &Obj.addSection<DecompressedSection>(*CS); in handleArgs()
478 Obj.removeSections(RemovePred); in handleArgs()
481 for (auto &Sec : Obj.sections()) { in handleArgs()
514 Obj.addSection<OwnedDataSection>(SecName, Data); in handleArgs()
525 if (Error E = dumpSectionToFile(SecName, File, Obj)) in handleArgs()
531 Obj.addSection<GnuDebugLinkSection>(Config.AddGnuDebugLink); in handleArgs()
537 std::unique_ptr<Object> Obj = Reader.create(); in executeObjcopyOnRawBinary() local
543 handleArgs(Config, *Obj, Reader, OutputElfType); in executeObjcopyOnRawBinary()
545 createWriter(Config, *Obj, Out, OutputElfType); in executeObjcopyOnRawBinary()
553 std::unique_ptr<Object> Obj = Reader.create(); in executeObjcopyOnBinary() local
571 handleArgs(Config, *Obj, Reader, OutputElfType); in executeObjcopyOnBinary()
573 createWriter(Config, *Obj, Out, OutputElfType); in executeObjcopyOnBinary()