Lines Matching refs:osec

86   void addStartStopSymbols(OutputSection &osec);
318 if (osd->osec.name == name && osd->osec.partition == partition) in findSection()
319 return &osd->osec; in findSection()
789 OutputSection &osec = osd->osec; in addSectionSymbols() local
793 for (SectionCommand *cmd : osec.commands) { in addSectionSymbols()
820 /*value=*/0, /*size=*/0, &osec)); in addSectionSymbols()
927 static unsigned getSectionRank(OutputSection &osec) { in getSectionRank() argument
928 unsigned rank = osec.partition * RF_PARTITION; in getSectionRank()
932 if (config->sectionStartMap.count(osec.name)) in getSectionRank()
938 if (!(osec.flags & SHF_ALLOC)) in getSectionRank()
941 if (osec.type == SHT_LLVM_PART_EHDR) in getSectionRank()
943 if (osec.type == SHT_LLVM_PART_PHDR) in getSectionRank()
948 if (osec.name == ".interp") in getSectionRank()
954 if (osec.type == SHT_NOTE) in getSectionRank()
970 bool isExec = osec.flags & SHF_EXECINSTR; in getSectionRank()
971 bool isWrite = osec.flags & SHF_WRITE; in getSectionRank()
977 if (osec.type == SHT_PROGBITS) in getSectionRank()
980 if (!(osec.flags & SHF_X86_64_LARGE && config->emachine == EM_X86_64)) in getSectionRank()
988 if (!(osec.flags & SHF_TLS)) in getSectionRank()
990 if (isRelroSection(&osec)) in getSectionRank()
991 osec.relro = true; in getSectionRank()
996 if (osec.flags & SHF_X86_64_LARGE && config->emachine == EM_X86_64) in getSectionRank()
1002 if (osec.type == SHT_NOBITS) in getSectionRank()
1012 StringRef name = osec.name; in getSectionRank()
1020 if (osec.name != ".got") in getSectionRank()
1024 if (osec.flags & SHF_MIPS_GPREL) in getSectionRank()
1031 StringRef name = osec.name; in getSectionRank()
1032 if (name == ".sdata" || (osec.type == SHT_NOBITS && name != ".sbss")) in getSectionRank()
1041 const OutputSection *a = &cast<OutputDesc>(aCmd)->osec; in compareSections()
1042 const OutputSection *b = &cast<OutputDesc>(bCmd)->osec; in compareSections()
1179 return (osd && osd->osec.hasInputSections) in getRankProximity()
1180 ? llvm::countl_zero(a->sortRank ^ osd->osec.sortRank) in getRankProximity()
1210 OutputSection *sec = &cast<OutputDesc>(*e)->osec; in findOrphanPos()
1232 auto foundSec = &cast<OutputDesc>(*i)->osec; in findOrphanPos()
1247 if (!curSecDesc || !curSecDesc->osec.hasInputSections) in findOrphanPos()
1250 sortRank < curSecDesc->osec.sortRank) in findOrphanPos()
1256 return osd && osd->osec.hasInputSections; in findOrphanPos()
1449 static void sortSection(OutputSection &osec, in sortSection() argument
1451 StringRef name = osec.name; in sortSection()
1462 if (in.relaIplt->getParent() == &osec) in sortSection()
1470 for (SectionCommand *b : osec.commands) in sortSection()
1472 sortISDBySectionOrder(isd, order, osec.flags & SHF_EXECINSTR); in sortSection()
1478 osec.sortInitFini(); in sortSection()
1480 osec.sortCtorsDtors(); in sortSection()
1487 assert(osec.commands.size() == 1); in sortSection()
1488 auto *isd = cast<InputSectionDescription>(osec.commands[0]); in sortSection()
1505 sortSection(osd->osec, order); in sortInputSections()
1522 osd->osec.sortRank = getSectionRank(osd->osec); in sortSections()
1587 return osd->osec.sectionIndex == UINT32_MAX; in sortOrphanSections()
1607 OutputSection *orphan = &cast<OutputDesc>(*nonScriptI)->osec; in sortOrphanSections()
1613 return cast<OutputDesc>(cmd)->osec.sortRank != rank; in sortOrphanSections()
1769 OutputSection *osec = &osd->osec; in finalizeAddressDependentContent() local
1770 if (osec->addr % osec->addralign != 0) in finalizeAddressDependentContent()
1771 warn("address (0x" + Twine::utohexstr(osec->addr) + ") of section " + in finalizeAddressDependentContent()
1772 osec->name + " is not a multiple of alignment (" + in finalizeAddressDependentContent()
1773 Twine(osec->addralign) + ")"); in finalizeAddressDependentContent()
1835 for (OutputSection *osec : outputSections) { in optimizeBasicBlockJumps()
1836 if (!(osec->flags & SHF_EXECINSTR)) in optimizeBasicBlockJumps()
1838 ArrayRef<InputSection *> sections = getInputSections(*osec, storage); in optimizeBasicBlockJumps()
1857 for (OutputSection *osec : outputSections) in optimizeBasicBlockJumps()
1858 for (InputSection *is : getInputSections(*osec, storage)) in optimizeBasicBlockJumps()
1898 if (OutputSection *osec = cast<SyntheticSection>(sec)->getParent()) in removeUnusedSyntheticSections() local
1899 for (SectionCommand *cmd : osec->commands) in removeUnusedSyntheticSections()
1922 addStartStopSymbols(osd->osec); in finalizeSections()
2105 OutputSection *osec = &osd->osec; in finalizeSections() local
2106 outputSections.push_back(osec); in finalizeSections()
2107 osec->sectionIndex = outputSections.size(); in finalizeSections()
2108 osec->shName = in.shStrTab->addString(osec->name); in finalizeSections()
2285 for (OutputSection *osec : outputSections) in checkExecuteOnly()
2286 if (osec->flags & SHF_EXECINSTR) in checkExecuteOnly()
2287 for (InputSection *isec : getInputSections(*osec, storage)) in checkExecuteOnly()
2290 toString(osec->name) + in checkExecuteOnly()
2341 void Writer<ELFT>::addStartStopSymbols(OutputSection &osec) { in addStartStopSymbols() argument
2342 StringRef s = osec.name; in addStartStopSymbols()
2345 addOptionalRegular(saver().save("__start_" + s), &osec, 0, in addStartStopSymbols()
2347 addOptionalRegular(saver().save("__stop_" + s), &osec, -1, in addStartStopSymbols()
2715 for (OutputSection *osec : outputSections) in assignFileOffsets()
2716 if (!(osec->flags & SHF_ALLOC)) { in assignFileOffsets()
2717 osec->offset = alignToPowerOf2(off, osec->addralign); in assignFileOffsets()
2718 off = osec->offset + osec->size; in assignFileOffsets()