Lines Matching refs:sec
344 void OutputSection::addContributingPartialSection(PartialSection *sec) { in addContributingPartialSection() argument
345 contribSections.push_back(sec); in addContributingPartialSection()
545 for (OutputSection *sec : ctx.outputSections) { in finalizeAddresses()
546 sec->origChunks = sec->chunks; in finalizeAddresses()
547 origNumChunks += sec->chunks.size(); in finalizeAddresses()
557 for (OutputSection *sec : ctx.outputSections) { in finalizeAddresses()
558 if (!verifyRanges(sec->chunks)) { in finalizeAddresses()
562 numChunks += sec->chunks.size(); in finalizeAddresses()
578 for (OutputSection *sec : ctx.outputSections) in finalizeAddresses()
579 sec->chunks = sec->origChunks; in finalizeAddresses()
586 for (OutputSection *sec : ctx.outputSections) in finalizeAddresses()
587 addressesChanged |= createThunks(sec, margin); in finalizeAddresses()
667 if (auto *sec = dyn_cast<SectionChunk>(c)) in sortBySectionOrder() local
668 if (sec->sym) in sortBySectionOrder()
669 return config->order.lookup(sec->sym->getName()); in sortBySectionOrder()
837 OutputSection *&sec = sections[{name, outChars}]; in createSections() local
838 if (!sec) { in createSections()
839 sec = make<OutputSection>(name, outChars); in createSections()
840 ctx.outputSections.push_back(sec); in createSections()
842 return sec; in createSections()
917 OutputSection *sec = createSection(name, outChars); in createSections() local
919 sec->addChunk(c); in createSections()
921 sec->addContributingPartialSection(pSec); in createSections()
1200 for (OutputSection *sec : ctx.outputSections) { in createSymbolAndStringTable()
1201 if (sec->name.size() <= COFF::NameSize) in createSymbolAndStringTable()
1203 if ((sec->header.Characteristics & IMAGE_SCN_MEM_DISCARDABLE) == 0) in createSymbolAndStringTable()
1206 warn("section name " + sec->name + in createSymbolAndStringTable()
1210 sec->setStringTableOff(addEntryToStringTable(sec->name)); in createSymbolAndStringTable()
1289 for (OutputSection *sec : ctx.outputSections) { in assignAddresses()
1290 if (sec == relocSec) in assignAddresses()
1293 sec->header.VirtualAddress = rva; in assignAddresses()
1298 (sec->header.Characteristics & IMAGE_SCN_CNT_CODE) && in assignAddresses()
1299 (sec->header.Characteristics & IMAGE_SCN_MEM_READ) && in assignAddresses()
1300 (sec->header.Characteristics & IMAGE_SCN_MEM_EXECUTE); in assignAddresses()
1303 for (Chunk *c : sec->chunks) { in assignAddresses()
1313 error("section larger than 4 GiB: " + sec->name); in assignAddresses()
1314 sec->header.VirtualSize = virtualSize; in assignAddresses()
1315 sec->header.SizeOfRawData = rawSize; in assignAddresses()
1317 sec->header.PointerToRawData = fileSize; in assignAddresses()
1508 for (OutputSection *sec : ctx.outputSections) { in writeHeader()
1509 sec->writeHeaderTo(buf); in writeHeader()
1858 for (OutputSection *sec : ctx.outputSections) in setSectionPermissions()
1859 if (sec->name == name) in setSectionPermissions()
1860 sec->setPermissions(perm); in setSectionPermissions()
1871 for (OutputSection *sec : ctx.outputSections) { in writeSections()
1872 uint8_t *secBuf = buf + sec->getFileOff(); in writeSections()
1876 if (sec->header.Characteristics & IMAGE_SCN_CNT_CODE) in writeSections()
1877 memset(secBuf, 0xCC, sec->getRawSize()); in writeSections()
1878 parallelForEach(sec->chunks, [&](Chunk *c) { in writeSections()
1879 c->writeTo(secBuf + c->getRVA() - sec->getRVA()); in writeSections()
2009 for (OutputSection *sec : ctx.outputSections) in findSection()
2010 if (sec->name == name) in findSection()
2011 return sec; in findSection()
2029 for (OutputSection *sec : ctx.outputSections) { in addBaserels()
2030 if (sec->header.Characteristics & IMAGE_SCN_MEM_DISCARDABLE) in addBaserels()
2033 for (Chunk *c : sec->chunks) in addBaserels()
2082 OutputSection *sec = ctx.getOutputSection(tlsSym->getChunk()); in fixTlsAlignment() local
2083 assert(sec && tlsSym->getRVA() >= sec->getRVA() && in fixTlsAlignment()
2086 uint8_t *secBuf = buffer->getBufferStart() + sec->getFileOff(); in fixTlsAlignment()
2087 uint64_t tlsOffset = tlsSym->getRVA() - sec->getRVA(); in fixTlsAlignment()
2092 if (tlsOffset + directorySize > sec->getRawSize()) in fixTlsAlignment()