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);
311 for (const std::unique_ptr<Section> &Sec : LC.Sections) {
312 if (Sec->CanonicalName == SecName) {
314 FileOutputBuffer::create(Filename, Sec->Content.size());
318 llvm::copy(Sec->Content, Buf->getBufferStart());
333 Section Sec(TargetSegName, Pair.second);
334 Sec.Content =
336 Sec.Size = Sec.Content.size();
345 LC.Sections.push_back(std::make_unique<Section>(Sec));
354 Obj.addSegment(TargetSegName, alignTo(Sec.Size, 16384));
355 NewSegment.Sections.push_back(std::make_unique<Section>(Sec));
372 [SecName](const std::unique_ptr<Section> &Sec) {
373 return Sec->Sectname == SecName;
389 Section &Sec = *SecToUpdateOrErr;
391 if (NewSection.SectionData->getBufferSize() > Sec.Size)
395 Sec.Content = O.NewSectionsContents.save(NewSection.SectionData->getBuffer());
396 Sec.Size = Sec.Content.size();
444 for (std::unique_ptr<Section> &Sec : LC.Sections)
445 Sec->Relocations.clear();