Lines Matching defs:Sec
32 using SectionPred = std::function<bool(const std::unique_ptr<Section> &Sec)>;
61 RemovePred = [&Config, RemovePred](const std::unique_ptr<Section> &Sec) {
62 return Config.ToRemove.matches(Sec->CanonicalName);
68 RemovePred = [RemovePred](const std::unique_ptr<Section> &Sec) {
69 if (Sec->Segname == "__DWARF")
72 return RemovePred(Sec);
78 RemovePred = [&Config](const std::unique_ptr<Section> &Sec) {
79 return !Config.OnlySection.matches(Sec->CanonicalName);
292 for (const std::unique_ptr<Section> &Sec : LC.Sections) {
293 if (Sec->CanonicalName == SecName) {
295 FileOutputBuffer::create(Filename, Sec->Content.size());
299 llvm::copy(Sec->Content, Buf->getBufferStart());
314 Section Sec(TargetSegName, Pair.second);
315 Sec.Content =
317 Sec.Size = Sec.Content.size();
326 LC.Sections.push_back(std::make_unique<Section>(Sec));
335 Obj.addSegment(TargetSegName, alignTo(Sec.Size, 16384));
336 NewSegment.Sections.push_back(std::make_unique<Section>(Sec));
353 [SecName](const std::unique_ptr<Section> &Sec) {
354 return Sec->Sectname == SecName;
370 Section &Sec = *SecToUpdateOrErr;
372 if (NewSection.SectionData->getBufferSize() > Sec.Size)
376 Sec.Content = O.NewSectionsContents.save(NewSection.SectionData->getBuffer());
377 Sec.Size = Sec.Content.size();
425 for (std::unique_ptr<Section> &Sec : LC.Sections)
426 Sec->Relocations.clear();