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);
349 chunks.insert(chunks.begin(), c);
358 chunks.insert(chunks.end(), other->chunks.begin(), other->chunks.end());
359 other->chunks.clear();
463 // Recheck Chunks.size() each iteration, since we can insert more
465 for (size_t i = 0; i != os->chunks.size(); ++i) {
466 SectionChunk *sc = dyn_cast_or_null<SectionChunk>(os->chunks[i]);
504 os->chunks.insert(os->chunks.begin() + thunkInsertionSpot, thunkChunk);
573 for (Chunk *c : sec->chunks) {
574 // Skip empty section chunks. MS link.exe does not seem to do that and
596 bool Writer::verifyRanges(const std::vector<Chunk *> chunks) {
597 for (Chunk *c : chunks) {
628 sec->origChunks = sec->chunks;
629 origNumChunks += sec->chunks.size();
644 if (!verifyRanges(sec->chunks)) {
648 numChunks += sec->chunks.size();
666 sec->chunks = sec->origChunks;
803 void Writer::sortBySectionOrder(std::vector<Chunk *> &chunks) {
811 llvm::stable_sort(chunks, [=](const Chunk *a, const Chunk *b) {
828 destSec->chunks.insert(destSec->chunks.end(), pSec->chunks.begin(),
829 pSec->chunks.end());
830 pSec->chunks.clear();
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
848 // be sorted into the same sections as our own synthesized .idata chunks.
852 // Sort all .idata$* chunks, grouping chunks from the same library,
859 if (!pSec->chunks.empty())
861 llvm::stable_sort(pSec->chunks, [&](Chunk *s, Chunk *t) {
882 // Add generated idata chunks, for imported symbols and DLLs, and a
889 // chunks from other linked in object files to be grouped together.
893 pSec->chunks.insert(pSec->chunks.end(), v.begin(), v.end());
912 if (!importDirs->chunks.empty())
913 importTableStart = importDirs->chunks.front();
914 for (Chunk *c : importDirs->chunks)
919 if (!importAddresses->chunks.empty())
920 iatStart = importAddresses->chunks.front();
921 for (Chunk *c : importAddresses->chunks)
960 sortBySectionOrder(it.second->chunks);
1000 // Then bin chunks by name and output characteristics.
1017 pSec->chunks.push_back(c);
1054 sortCRTSectionChunks(pSec->chunks);
1058 for (Chunk *c : pSec->chunks)
1091 llvm::TimeTraceScope timeScope("Misc chunks");
1107 // Create Debug Information Chunks
1162 // so we just let it create chunks and add them to the section.
1227 if (!edataSec->chunks.empty()) {
1233 for (Chunk *c : edata.chunks)
1236 if (!edataSec->chunks.empty()) {
1237 edataStart = edataSec->chunks.front();
1238 edataEnd = edataSec->chunks.back();
1254 // later. Only remove sections that have no Chunks at all.
1255 return s->chunks.empty();
1275 for (Chunk *c : os->chunks)
1280 // Merge chunks are containers of chunks, so assign those an output section
1424 if (!pdataSec->chunks.empty()) {
1428 llvm::stable_sort(pdataSec->chunks, [=](const Chunk *a, const Chunk *b) {
1432 for (auto chunk : pdataSec->chunks) {
1435 hybridPdata.last = pdataSec->chunks.back();
1444 pdata.first = pdataSec->chunks.front();
1445 pdata.last = pdataSec->chunks.back();
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) {
1498 // We do it here to make sure that we account for range extension chunks.
1524 for (Chunk *c : sec->chunks) {
1871 // We only care about live section chunks. Common chunks and other chunks
2047 // Create CHPE metadata chunks.
2167 // ADD instructions). Only fill the gaps between chunks. Most
2168 // chunks overwrite it anyway, but uninitialized data chunks
2173 for (Chunk *c : sec->chunks) {
2181 parallelForEach(sec->chunks, [&](Chunk *c) {
2302 // It is therefore critical to sort the chunks containing the function
2306 void Writer::sortCRTSectionChunks(std::vector<Chunk *> &chunks) {
2310 assert(sa && sb && "Non-section chunks in CRT section!");
2317 llvm::stable_sort(chunks, sectionChunkOrder);
2320 for (auto &c : chunks) {
2347 relocSec->chunks.clear();
2354 for (Chunk *c : sec->chunks)