Lines Matching refs:sect
54 SectionInfo(StringRef seg, StringRef sect, SectionType type,
159 void appendAtom(SectionInfo *sect, const DefinedAtom *atom);
166 void segIndexForSection(const SectionInfo *sect,
242 for (auto sect : _sectionMap) { in getRelocatableSection() local
243 if (sect.second->sectionName.equals(sectionName) && in getRelocatableSection()
244 sect.second->segmentName.equals(segmentName)) { in getRelocatableSection()
245 return sect.second; in getRelocatableSection()
249 auto *sect = new (_allocator) in getRelocatableSection() local
252 _sectionInfos.push_back(sect); in getRelocatableSection()
253 _sectionMap[type] = sect; in getRelocatableSection()
254 return sect; in getRelocatableSection()
257 #define ENTRY(seg, sect, type, atomType) \ argument
258 {seg, sect, type, DefinedAtom::atomType }
327 for (auto sect : _sectionMap) { in getFinalSection() local
328 if (sect.second->sectionName.equals(p.sectionName) && in getFinalSection()
329 sect.second->segmentName.equals(p.segmentName)) { in getFinalSection()
330 return sect.second; in getFinalSection()
334 auto *sect = new (_allocator) SectionInfo( in getFinalSection() local
337 _sectionInfos.push_back(sect); in getFinalSection()
338 _sectionMap[atomType] = sect; in getFinalSection()
339 return sect; in getFinalSection()
357 for(SectionInfo *sect : _customSections) { in sectionForAtom()
358 const DefinedAtom *firstAtom = sect->atomsAndOffsets.front().atom; in sectionForAtom()
360 return sect; in sectionForAtom()
368 auto *sect = in sectionForAtom() local
371 _customSections.push_back(sect); in sectionForAtom()
372 _sectionInfos.push_back(sect); in sectionForAtom()
373 return sect; in sectionForAtom()
377 void Util::appendAtom(SectionInfo *sect, const DefinedAtom *atom) { in appendAtom() argument
379 uint64_t offset = sect->size; in appendAtom()
391 if (align > sect->alignment) in appendAtom()
392 sect->alignment = atomAlign.value; in appendAtom()
395 sect->atomsAndOffsets.push_back(ai); in appendAtom()
397 sect->size = offset + atom->size(); in appendAtom()
496 unsigned Util::TextSectionSorter::weight(const SectionInfo *sect) { in weight() argument
497 return llvm::StringSwitch<unsigned>(sect->sectionName) in weight()
552 for (SectionInfo *sect : seg->sections) in organizeSections()
553 sect->finalSectionIndex = sectionIndex++; in organizeSections()
559 for (SectionInfo *sect : seg->sections) { in layoutSectionsInSegment()
560 sect->address = llvm::alignTo(addr, sect->alignment); in layoutSectionsInSegment()
561 addr = sect->address + sect->size; in layoutSectionsInSegment()
573 SectionInfo *sect = *it; in layoutSectionsInTextSegment() local
574 taddr -= sect->size; in layoutSectionsInTextSegment()
575 taddr = taddr & (0 - sect->alignment); in layoutSectionsInTextSegment()
582 for (SectionInfo *sect : seg->sections) { in layoutSectionsInTextSegment()
583 sect->address = llvm::alignTo(addr, sect->alignment); in layoutSectionsInTextSegment()
584 addr = sect->address + sect->size; in layoutSectionsInTextSegment()
742 for (SectionInfo *sect : _sectionInfos) { in buildAtomToAddressMap()
743 for (const AtomInfo &info : sect->atomsAndOffsets) { in buildAtomToAddressMap()
744 _atomToAddress[info.atom] = sect->address + info.offsetInSection; in buildAtomToAddressMap()
806 for (SectionInfo *sect : _sectionInfos) { in synthesizeDebugNotes()
807 for (const AtomInfo &info : sect->atomsAndOffsets) { in synthesizeDebugNotes()
1043 sym.sect = stab.other; in addSymbols()
1056 for (SectionInfo *sect : _sectionInfos) { in addSymbols()
1057 for (const AtomInfo &info : sect->atomsAndOffsets) { in addSymbols()
1066 AtomAndIndex ai = { atom, sect->finalSectionIndex, symbolScope }; in addSymbols()
1073 sym.sect = sect->finalSectionIndex; in addSymbols()
1089 sym.sect = sect->finalSectionIndex; in addSymbols()
1106 sym.sect = ai.index; in addSymbols()
1138 sym.sect = 0; in addSymbols()
1269 void Util::segIndexForSection(const SectionInfo *sect, uint8_t &segmentIndex, in segIndexForSection() argument
1273 if ((seg->address <= sect->address) in segIndexForSection()
1274 && (seg->address+seg->size >= sect->address+sect->size)) { in segIndexForSection()
1430 for (SectionInfo *sect : _sectionInfos) { in addRebaseAndBindingInfo()
1431 segIndexForSection(sect, segmentIndex, segmentStartAddr); in addRebaseAndBindingInfo()
1432 for (const AtomInfo &info : sect->atomsAndOffsets) { in addRebaseAndBindingInfo()
1537 for (SectionInfo *sect : _sectionInfos) { in addExportInfo()
1538 for (const AtomInfo &info : sect->atomsAndOffsets) { in addExportInfo()