Lines Matching full:sec

31 static bool isDebugSection(const Section &Sec) {  in isDebugSection()  argument
32 return Sec.Name.starts_with(".debug"); in isDebugSection()
66 Section Sec; in addSection() local
67 Sec.setOwnedContents(Contents); in addSection()
68 Sec.Name = Name; in addSection()
69 Sec.Header.VirtualSize = NeedVA ? Sec.getContents().size() : 0u; in addSection()
70 Sec.Header.VirtualAddress = NeedVA ? getNextRVA(Obj) : 0u; in addSection()
71 Sec.Header.SizeOfRawData = in addSection()
72 NeedVA ? alignTo(Sec.Header.VirtualSize, in addSection()
74 : Sec.getContents().size(); in addSection()
75 // Sec.Header.PointerToRawData is filled in by the writer. in addSection()
76 Sec.Header.PointerToRelocations = 0; in addSection()
77 Sec.Header.PointerToLinenumbers = 0; in addSection()
78 // Sec.Header.NumberOfRelocations is filled in by the writer. in addSection()
79 Sec.Header.NumberOfLinenumbers = 0; in addSection()
80 Sec.Header.Characteristics = Characteristics; in addSection()
82 Obj.addSections(Sec); in addSection()
166 Obj.removeSections([&Config](const Section &Sec) { in handleArgs() argument
169 if (!Config.OnlySection.empty() && !Config.OnlySection.matches(Sec.Name)) in handleArgs()
174 if (isDebugSection(Sec) && in handleArgs()
175 (Sec.Header.Characteristics & IMAGE_SCN_MEM_DISCARDABLE) != 0) in handleArgs()
179 if (Config.ToRemove.matches(Sec.Name)) in handleArgs()
188 Obj.truncateSections([](const Section &Sec) { in handleArgs() argument
189 return !isDebugSection(Sec) && Sec.Name != ".buildid" && in handleArgs()
190 ((Sec.Header.Characteristics & in handleArgs()
197 for (Section &Sec : Obj.getMutableSections()) in handleArgs()
198 Sec.Relocs.clear(); in handleArgs()
256 for (Section &Sec : Obj.getMutableSections()) { in handleArgs()
257 const auto It = Config.SetSectionFlags.find(Sec.Name); in handleArgs()
259 Sec.Header.Characteristics = flagsToCharacteristics( in handleArgs()
260 It->second.NewFlags, Sec.Header.Characteristics); in handleArgs()
279 auto It = llvm::find_if(Obj.getMutableSections(), [&](auto &Sec) { in handleArgs() argument
280 return Sec.Name == NewSection.SectionName; in handleArgs()