Lines Matching full:chunks

182 // PartialSection represents a group of chunks that contribute to an
227 bool verifyRanges(const std::vector<Chunk *> chunks);
257 void sortCRTSectionChunks(std::vector<Chunk *> &chunks);
259 void sortBySectionOrder(std::vector<Chunk *> &chunks);
328 // the chunks that the linker creates. All .pdata chunks come from input
345 chunks.push_back(c); in addChunk()
349 chunks.insert(chunks.begin(), c); in insertChunkAtStart()
358 chunks.insert(chunks.end(), other->chunks.begin(), other->chunks.end()); in merge()
359 other->chunks.clear(); in merge()
463 // Recheck Chunks.size() each iteration, since we can insert more in createThunks()
465 for (size_t i = 0; i != os->chunks.size(); ++i) { in createThunks()
466 SectionChunk *sc = dyn_cast_or_null<SectionChunk>(os->chunks[i]); in createThunks()
504 os->chunks.insert(os->chunks.begin() + thunkInsertionSpot, thunkChunk); in createThunks()
573 for (Chunk *c : sec->chunks) { in createECCodeMap()
574 // Skip empty section chunks. MS link.exe does not seem to do that and in createECCodeMap()
596 bool Writer::verifyRanges(const std::vector<Chunk *> chunks) { in verifyRanges() argument
597 for (Chunk *c : chunks) { in verifyRanges()
628 sec->origChunks = sec->chunks; in finalizeAddresses()
629 origNumChunks += sec->chunks.size(); in finalizeAddresses()
644 if (!verifyRanges(sec->chunks)) { in finalizeAddresses()
648 numChunks += sec->chunks.size(); in finalizeAddresses()
666 sec->chunks = sec->origChunks; in finalizeAddresses()
803 void Writer::sortBySectionOrder(std::vector<Chunk *> &chunks) { in sortBySectionOrder() argument
811 llvm::stable_sort(chunks, [=](const Chunk *a, const Chunk *b) { in sortBySectionOrder()
828 destSec->chunks.insert(destSec->chunks.end(), pSec->chunks.begin(), in fixPartialSectionChars()
829 pSec->chunks.end()); in fixPartialSectionChars()
830 pSec->chunks.clear(); in fixPartialSectionChars()
834 // Sort concrete section chunks from GNU import libraries.
837 // libraries that consist of object files, with section chunks for the .idata$*
841 // be formed correctly, the section chunks within each .idata$* section need
847 // Make sure all .idata$* section chunks are mapped as RDATA in order to in fixGnuImportChunks()
848 // be sorted into the same sections as our own synthesized .idata chunks. in fixGnuImportChunks()
852 // Sort all .idata$* chunks, grouping chunks from the same library, in fixGnuImportChunks()
859 if (!pSec->chunks.empty()) in fixGnuImportChunks()
861 llvm::stable_sort(pSec->chunks, [&](Chunk *s, Chunk *t) { in fixGnuImportChunks()
882 // Add generated idata chunks, for imported symbols and DLLs, and a
889 // chunks from other linked in object files to be grouped together. in addSyntheticIdata()
893 pSec->chunks.insert(pSec->chunks.end(), v.begin(), v.end()); in addSyntheticIdata()
912 if (!importDirs->chunks.empty()) in locateImportTables()
913 importTableStart = importDirs->chunks.front(); in locateImportTables()
914 for (Chunk *c : importDirs->chunks) in locateImportTables()
919 if (!importAddresses->chunks.empty()) in locateImportTables()
920 iatStart = importAddresses->chunks.front(); in locateImportTables()
921 for (Chunk *c : importAddresses->chunks) in locateImportTables()
960 sortBySectionOrder(it.second->chunks); in sortSections()
1000 // Then bin chunks by name and output characteristics. in createSections()
1017 pSec->chunks.push_back(c); in createSections()
1054 sortCRTSectionChunks(pSec->chunks); in createSections()
1058 for (Chunk *c : pSec->chunks) in createSections()
1091 llvm::TimeTraceScope timeScope("Misc chunks"); in createMiscChunks()
1107 // Create Debug Information Chunks in createMiscChunks()
1162 // so we just let it create chunks and add them to the section.
1227 if (!edataSec->chunks.empty()) { in createExportTable()
1233 for (Chunk *c : edata.chunks) in createExportTable()
1236 if (!edataSec->chunks.empty()) { in createExportTable()
1237 edataStart = edataSec->chunks.front(); in createExportTable()
1238 edataEnd = edataSec->chunks.back(); in createExportTable()
1254 // later. Only remove sections that have no Chunks at all. in removeUnusedSections()
1255 return s->chunks.empty(); in removeUnusedSections()
1275 for (Chunk *c : os->chunks) in assignOutputSectionIndices()
1280 // Merge chunks are containers of chunks, so assign those an output section in assignOutputSectionIndices()
1424 if (!pdataSec->chunks.empty()) { in mergeSections()
1428 llvm::stable_sort(pdataSec->chunks, [=](const Chunk *a, const Chunk *b) { in mergeSections()
1432 for (auto chunk : pdataSec->chunks) { in mergeSections()
1435 hybridPdata.last = pdataSec->chunks.back(); in mergeSections()
1444 pdata.first = pdataSec->chunks.front(); in mergeSections()
1445 pdata.last = pdataSec->chunks.back(); in mergeSections()
1474 // EC targets may have chunks of various architectures mixed together at this
1475 // point. Group code chunks of the same architecture together by sorting chunks
1483 llvm::stable_sort(sec->chunks, [=](const Chunk *a, const Chunk *b) { in sortECChunks()
1498 // We do it here to make sure that we account for range extension chunks. in assignAddresses()
1524 for (Chunk *c : sec->chunks) { in assignAddresses()
1871 // We only care about live section chunks. Common chunks and other chunks in markSymbolsWithRelocations()
2047 // Create CHPE metadata chunks.
2167 // ADD instructions). Only fill the gaps between chunks. Most in writeSections()
2168 // chunks overwrite it anyway, but uninitialized data chunks in writeSections()
2173 for (Chunk *c : sec->chunks) { in writeSections()
2181 parallelForEach(sec->chunks, [&](Chunk *c) { in writeSections()
2302 // It is therefore critical to sort the chunks containing the function
2306 void Writer::sortCRTSectionChunks(std::vector<Chunk *> &chunks) { in sortCRTSectionChunks() argument
2310 assert(sa && sb && "Non-section chunks in CRT section!"); in sortCRTSectionChunks()
2317 llvm::stable_sort(chunks, sectionChunkOrder); in sortCRTSectionChunks()
2320 for (auto &c : chunks) { in sortCRTSectionChunks()
2347 relocSec->chunks.clear(); in addBaserels()
2354 for (Chunk *c : sec->chunks) in addBaserels()