Lines Matching refs:osec
86 void addStartStopSymbols(OutputSection &osec);
276 if (osd->osec.name == name && osd->osec.partition == partition) in findSection()
277 return &osd->osec; in findSection()
725 OutputSection &osec = osd->osec; in addSectionSymbols() local
729 for (SectionCommand *cmd : osec.commands) { in addSectionSymbols()
756 /*value=*/0, /*size=*/0, &osec)); in addSectionSymbols()
869 static unsigned getSectionRank(const OutputSection &osec) { in getSectionRank() argument
870 unsigned rank = osec.partition * RF_PARTITION; in getSectionRank()
874 if (config->sectionStartMap.count(osec.name)) in getSectionRank()
880 if (!(osec.flags & SHF_ALLOC)) in getSectionRank()
883 if (osec.type == SHT_LLVM_PART_EHDR) in getSectionRank()
887 if (osec.type == SHT_LLVM_PART_PHDR) in getSectionRank()
893 if (osec.name == ".interp") in getSectionRank()
901 if (osec.type == SHT_NOTE) in getSectionRank()
916 bool isExec = osec.flags & SHF_EXECINSTR; in getSectionRank()
917 bool isWrite = osec.flags & SHF_WRITE; in getSectionRank()
926 } else if (osec.type == SHT_PROGBITS) { in getSectionRank()
939 if (!isRelroSection(&osec)) in getSectionRank()
948 if (!(osec.flags & SHF_TLS)) in getSectionRank()
953 if (osec.type == SHT_NOBITS) in getSectionRank()
965 StringRef name = osec.name; in getSectionRank()
985 if (osec.flags & SHF_MIPS_GPREL) in getSectionRank()
988 if (osec.name != ".got") in getSectionRank()
997 const OutputSection *a = &cast<OutputDesc>(aCmd)->osec; in compareSections()
998 const OutputSection *b = &cast<OutputDesc>(bCmd)->osec; in compareSections()
1135 return (osd && osd->osec.hasInputSections) in getRankProximity()
1136 ? getRankProximityAux(*a, osd->osec) in getRankProximity()
1166 OutputSection *sec = &cast<OutputDesc>(*e)->osec; in findOrphanPos()
1176 auto foundSec = &cast<OutputDesc>(*i)->osec; in findOrphanPos()
1191 if (!curSecDesc || !curSecDesc->osec.hasInputSections) in findOrphanPos()
1194 sortRank < curSecDesc->osec.sortRank) in findOrphanPos()
1200 return osd && osd->osec.hasInputSections; in findOrphanPos()
1393 static void sortSection(OutputSection &osec, in sortSection() argument
1395 StringRef name = osec.name; in sortSection()
1406 if (in.relaIplt->getParent() == &osec) in sortSection()
1414 for (SectionCommand *b : osec.commands) in sortSection()
1416 sortISDBySectionOrder(isd, order, osec.flags & SHF_EXECINSTR); in sortSection()
1422 osec.sortInitFini(); in sortSection()
1424 osec.sortCtorsDtors(); in sortSection()
1431 assert(osec.commands.size() == 1); in sortSection()
1432 auto *isd = cast<InputSectionDescription>(osec.commands[0]); in sortSection()
1449 sortSection(osd->osec, order); in sortInputSections()
1466 osd->osec.sortRank = getSectionRank(osd->osec); in sortSections()
1527 return osd->osec.sectionIndex == UINT32_MAX; in sortSections()
1547 OutputSection *orphan = &cast<OutputDesc>(*nonScriptI)->osec; in sortSections()
1553 return cast<OutputDesc>(cmd)->osec.sortRank != rank; in sortSections()
1708 OutputSection *osec = &osd->osec; in finalizeAddressDependentContent() local
1709 if (osec->addr % osec->alignment != 0) in finalizeAddressDependentContent()
1710 warn("address (0x" + Twine::utohexstr(osec->addr) + ") of section " + in finalizeAddressDependentContent()
1711 osec->name + " is not a multiple of alignment (" + in finalizeAddressDependentContent()
1712 Twine(osec->alignment) + ")"); in finalizeAddressDependentContent()
1774 for (OutputSection *osec : outputSections) { in optimizeBasicBlockJumps()
1775 if (!(osec->flags & SHF_EXECINSTR)) in optimizeBasicBlockJumps()
1777 ArrayRef<InputSection *> sections = getInputSections(*osec, storage); in optimizeBasicBlockJumps()
1796 for (OutputSection *osec : outputSections) in optimizeBasicBlockJumps()
1797 for (InputSection *is : getInputSections(*osec, storage)) in optimizeBasicBlockJumps()
1838 if (OutputSection *osec = cast<SyntheticSection>(sec)->getParent()) in removeUnusedSyntheticSections() local
1839 for (SectionCommand *cmd : osec->commands) in removeUnusedSyntheticSections()
1862 addStartStopSymbols(osd->osec); in finalizeSections()
2031 OutputSection *osec = &osd->osec; in finalizeSections() local
2032 outputSections.push_back(osec); in finalizeSections()
2033 osec->sectionIndex = outputSections.size(); in finalizeSections()
2034 osec->shName = in.shStrTab->addString(osec->name); in finalizeSections()
2191 for (OutputSection *osec : outputSections) in checkExecuteOnly()
2192 if (osec->flags & SHF_EXECINSTR) in checkExecuteOnly()
2193 for (InputSection *isec : getInputSections(*osec, storage)) in checkExecuteOnly()
2196 toString(osec->name) + in checkExecuteOnly()
2247 void Writer<ELFT>::addStartStopSymbols(OutputSection &osec) { in addStartStopSymbols() argument
2248 StringRef s = osec.name; in addStartStopSymbols()
2251 addOptionalRegular(saver().save("__start_" + s), &osec, 0, in addStartStopSymbols()
2253 addOptionalRegular(saver().save("__stop_" + s), &osec, -1, in addStartStopSymbols()
2609 for (OutputSection *osec : outputSections) in assignFileOffsets()
2610 if (!(osec->flags & SHF_ALLOC)) { in assignFileOffsets()
2611 osec->offset = alignToPowerOf2(off, osec->alignment); in assignFileOffsets()
2612 off = osec->offset + osec->size; in assignFileOffsets()