Lines Matching defs:Sec
31 static Section constructSectionCommon(const SectionType &Sec, uint32_t Index) {
32 StringRef SegName(Sec.segname, strnlen(Sec.segname, sizeof(Sec.segname)));
33 StringRef SectName(Sec.sectname, strnlen(Sec.sectname, sizeof(Sec.sectname)));
36 S.Addr = Sec.addr;
37 S.Size = Sec.size;
38 S.OriginalOffset = Sec.offset;
39 S.Align = Sec.align;
40 S.RelOff = Sec.reloff;
41 S.NReloc = Sec.nreloc;
42 S.Flags = Sec.flags;
43 S.Reserved1 = Sec.reserved1;
44 S.Reserved2 = Sec.reserved2;
49 Section constructSection(const MachO::section &Sec, uint32_t Index) {
50 return constructSectionCommon(Sec, Index);
53 Section constructSection(const MachO::section_64 &Sec, uint32_t Index) {
54 Section S = constructSectionCommon(Sec, Index);
55 S.Reserved3 = Sec.reserved3;
69 SectionType Sec;
70 memcpy((void *)&Sec, reinterpret_cast<const char *>(Curr),
74 MachO::swapStruct(Sec);
77 std::make_unique<Section>(constructSection(Sec, NextSectionIndex)));
254 for (std::unique_ptr<Section> &Sec : LC.Sections)
255 Sections.push_back(Sec.get());
258 for (std::unique_ptr<Section> &Sec : LC.Sections)
259 for (auto &Reloc : Sec->Relocations)
270 Reloc.Sec = Sections[SymbolNum - 1];
355 for (const std::unique_ptr<Section> &Sec : LC.Sections)
356 if (Sec->Sectname == "__objc_imageinfo" &&
357 (Sec->Segname == "__DATA" || Sec->Segname == "__DATA_CONST" ||
358 Sec->Segname == "__DATA_DIRTY") &&
359 Sec->Content.size() >= sizeof(ObjCImageInfo)) {
360 memcpy(&ImageInfo, Sec->Content.data(), sizeof(ObjCImageInfo));