• Home
  • Raw
  • Download

Lines Matching refs:Sec

30 static bool isDebugSection(const Section &Sec) {  in isDebugSection()  argument
31 return Sec.Name.startswith(".debug"); in isDebugSection()
65 Section Sec; in addSection() local
66 Sec.setOwnedContents(Contents); in addSection()
67 Sec.Name = Name; in addSection()
68 Sec.Header.VirtualSize = NeedVA ? Sec.getContents().size() : 0u; in addSection()
69 Sec.Header.VirtualAddress = NeedVA ? getNextRVA(Obj) : 0u; in addSection()
70 Sec.Header.SizeOfRawData = in addSection()
71 NeedVA ? alignTo(Sec.Header.VirtualSize, in addSection()
73 : Sec.getContents().size(); in addSection()
75 Sec.Header.PointerToRelocations = 0; in addSection()
76 Sec.Header.PointerToLinenumbers = 0; in addSection()
78 Sec.Header.NumberOfLinenumbers = 0; in addSection()
79 Sec.Header.Characteristics = Characteristics; in addSection()
81 Obj.addSections(Sec); in addSection()
97 static void setSectionFlags(Section &Sec, SectionFlag AllFlags) { in setSectionFlags() argument
111 (Sec.Header.Characteristics & PreserveMask) | IMAGE_SCN_MEM_READ; in setSectionFlags()
131 Sec.Header.Characteristics = NewCharacteristics; in setSectionFlags()
136 Obj.removeSections([&Config](const Section &Sec) { in handleArgs() argument
139 if (!Config.OnlySection.empty() && !Config.OnlySection.matches(Sec.Name)) in handleArgs()
144 if (isDebugSection(Sec) && in handleArgs()
145 (Sec.Header.Characteristics & IMAGE_SCN_MEM_DISCARDABLE) != 0) in handleArgs()
149 if (Config.ToRemove.matches(Sec.Name)) in handleArgs()
158 Obj.truncateSections([](const Section &Sec) { in handleArgs() argument
159 return !isDebugSection(Sec) && Sec.Name != ".buildid" && in handleArgs()
160 ((Sec.Header.Characteristics & in handleArgs()
167 for (Section &Sec : Obj.getMutableSections()) in handleArgs()
168 Sec.Relocs.clear(); in handleArgs()
226 for (Section &Sec : Obj.getMutableSections()) { in handleArgs()
227 const auto It = Config.SetSectionFlags.find(Sec.Name); in handleArgs()
229 setSectionFlags(Sec, It->second.NewFlags); in handleArgs()