Lines Matching refs:Obj
34 static uint64_t getNextRVA(const Object &Obj) { in getNextRVA() argument
35 if (Obj.getSections().empty()) in getNextRVA()
37 const Section &Last = Obj.getSections().back(); in getNextRVA()
39 Obj.IsPE ? Obj.PeHeader.SectionAlignment : 1); in getNextRVA()
60 static void addSection(Object &Obj, StringRef Name, ArrayRef<uint8_t> Contents, in addSection() argument
69 Sec.Header.VirtualAddress = NeedVA ? getNextRVA(Obj) : 0u; in addSection()
72 Obj.IsPE ? Obj.PeHeader.FileAlignment : 1) in addSection()
81 Obj.addSections(Sec); in addSection()
84 static Error addGnuDebugLink(Object &Obj, StringRef DebugLinkFile) { in addGnuDebugLink() argument
90 addSection(Obj, ".gnu_debuglink", *Contents, in addGnuDebugLink()
134 const COFFConfig &COFFConfig, Object &Obj) { in handleArgs() argument
136 Obj.removeSections([&Config](const Section &Sec) { in handleArgs()
158 Obj.truncateSections([](const Section &Sec) { in handleArgs()
167 for (Section &Sec : Obj.getMutableSections()) in handleArgs()
173 if (Error E = Obj.markSymbols()) in handleArgs()
176 for (Symbol &Sym : Obj.getMutableSymbols()) { in handleArgs()
222 if (Error Err = Obj.removeSymbols(ToRemove)) in handleArgs()
226 for (Section &Sec : Obj.getMutableSections()) { in handleArgs()
241 addSection(Obj, NewSection.SectionName, in handleArgs()
249 auto It = llvm::find_if(Obj.getMutableSections(), [&](auto &Sec) { in handleArgs()
252 if (It == Obj.getMutableSections().end()) in handleArgs()
271 if (Error E = addGnuDebugLink(Obj, Config.AddGnuDebugLink)) in handleArgs()
276 if (!Obj.IsPE) in handleArgs()
282 Obj.PeHeader.Subsystem = *COFFConfig.Subsystem; in handleArgs()
284 Obj.PeHeader.MajorSubsystemVersion = *COFFConfig.MajorSubsystemVersion; in handleArgs()
286 Obj.PeHeader.MinorSubsystemVersion = *COFFConfig.MinorSubsystemVersion; in handleArgs()
299 Object *Obj = ObjOrErr->get(); in executeObjcopyOnBinary() local
300 assert(Obj && "Unable to deserialize COFF object"); in executeObjcopyOnBinary()
301 if (Error E = handleArgs(Config, COFFConfig, *Obj)) in executeObjcopyOnBinary()
303 COFFWriter Writer(*Obj, Out); in executeObjcopyOnBinary()