| /freebsd/contrib/llvm-project/lld/MachO/ |
| H A D | MapFile.cpp | 136 const OutputSection *osec, size_t entrySize) { in printStubsEntries() argument 139 osec->addr + sym->stubsIndex * entrySize, entrySize, in printStubsEntries() 145 NonLazyPointerSectionBase *osec) { in printNonLazyPointerSection() argument 150 for (const Symbol *sym : osec->getEntries()) in printNonLazyPointerSection() 152 osec->addr + sym->gotIndex * target->wordSize, in printNonLazyPointerSection() 196 for (OutputSection *osec : seg->getSections()) { in writeMapFile() 197 if (osec->isHidden()) in writeMapFile() 200 os << format("0x%08llX\t0x%08llX\t%s\t%s\n", osec->addr, osec->getSize(), in writeMapFile() 201 seg->name.str().c_str(), osec->name.str().c_str()); in writeMapFile() 237 for (const OutputSection *osec : seg->getSections()) { in writeMapFile() local [all …]
|
| H A D | OutputSegment.cpp | 61 for (const OutputSection *osec : sections) in numNonHiddenSections() local 62 count += (!osec->isHidden() ? 1 : 0); in numNonHiddenSections() 66 void OutputSegment::addOutputSection(OutputSection *osec) { in addOutputSection() argument 67 inputOrder = std::min(inputOrder, osec->inputOrder); in addOutputSection() 69 osec->parent = this; in addOutputSection() 70 sections.push_back(osec); in addOutputSection() 73 if (sectAlign.segName == name && sectAlign.sectName == osec->name) in addOutputSection() 74 osec->align = sectAlign.align; in addOutputSection() 94 static int sectionOrder(OutputSection *osec) { in sectionOrder() argument 95 StringRef segname = osec->parent->name; in sectionOrder() [all …]
|
| H A D | Writer.cpp | 249 for (const OutputSection *osec : seg->getSections()) { in writeTo() local 250 if (osec->isHidden()) in writeTo() 256 memcpy(sectHdr->sectname, osec->name.data(), osec->name.size()); in writeTo() 259 sectHdr->addr = osec->addr; in writeTo() 260 sectHdr->offset = osec->fileOff; in writeTo() 261 sectHdr->align = Log2_32(osec->align); in writeTo() 262 sectHdr->flags = osec->flags; in writeTo() 263 sectHdr->size = osec->getSize(); in writeTo() 264 sectHdr->reserved1 = osec->reserved1; in writeTo() 265 sectHdr->reserved2 = osec->reserved2; in writeTo() [all …]
|
| H A D | Relocations.cpp | 103 auto *osec = cast<ConcatOutputSection>(sections[osecIdx - 1]); in offsetToInputSection() local 104 *off -= osec->fileOff; in offsetToInputSection() 107 for (; isecIdx < osec->inputs.size(); ++isecIdx) { in offsetToInputSection() 108 const ConcatInputSection *isec = osec->inputs[isecIdx]; in offsetToInputSection() 113 ConcatInputSection *isec = osec->inputs[isecIdx - 1]; in offsetToInputSection()
|
| H A D | InputSection.cpp | 62 auto *osec = ConcatOutputSection::getOrCreateForInput(isec); in addInputSection() local 63 isec->parent = osec; in addInputSection() 353 auto *osec = cast<WordLiteralSection>(parent); in getOffset() local 357 return osec->getLiteral4Offset(buf + (off & ~3LLU)) | (off & 3); in getOffset() 359 return osec->getLiteral8Offset(buf + (off & ~7LLU)) | (off & 7); in getOffset() 361 return osec->getLiteral16Offset(buf + (off & ~15LLU)) | (off & 15); in getOffset()
|
| H A D | ConcatOutputSection.cpp | 474 ConcatOutputSection *&osec = concatOutputSections[names]; in getOrCreateForInput() local 475 if (!osec) { in getOrCreateForInput() 479 osec = make<TextOutputSection>(names.second); in getOrCreateForInput() 481 osec = make<ConcatOutputSection>(names.second); in getOrCreateForInput() 483 return osec; in getOrCreateForInput()
|
| H A D | SymbolTable.cpp | 370 OutputSection *osec = nullptr; in handleSectionBoundarySymbol() local 374 osec = ssec->isec->parent; in handleSectionBoundarySymbol() 378 if (!osec) { in handleSectionBoundarySymbol() 389 osec = isec->parent = ConcatOutputSection::getOrCreateForInput(isec); in handleSectionBoundarySymbol() 394 osec->sectionStartSymbols.push_back(createBoundarySymbol(sym)); in handleSectionBoundarySymbol() 396 osec->sectionEndSymbols.push_back(createBoundarySymbol(sym)); in handleSectionBoundarySymbol()
|
| H A D | SyntheticSections.cpp | 149 for (const OutputSection *osec : seg->getSections()) { in writeTo() local 150 if (isThreadLocalVariables(osec->flags)) { in writeTo() 429 static void encodeBinding(const OutputSection *osec, uint64_t outSecOff, in encodeBinding() argument 432 OutputSegment *seg = osec->parent; in encodeBinding() 433 uint64_t offset = osec->getSegmentOffset() + outSecOff; in encodeBinding()
|
| H A D | Driver.cpp | 625 ConcatOutputSection *osec = nullptr; in replaceCommonSymbols() local 640 if (!osec) in replaceCommonSymbols() 641 osec = ConcatOutputSection::getOrCreateForInput(isec); in replaceCommonSymbols() 642 isec->parent = osec; in replaceCommonSymbols()
|
| /freebsd/contrib/llvm-project/lld/ELF/ |
| H A D | MapFile.cpp | 98 OutputSection *osec = syms[i]->getOutputSection(); in getSymbolStrings() local 100 uint64_t lma = osec ? osec->getLMA() + vma - osec->getVA(0) : 0; in getSymbolStrings() 141 const OutputSection *osec = sec->getOutputSection(); in printEhFrame() local 143 writeHeader(ctx, os, osec->addr + p.outputOff, osec->getLMA() + p.outputOff, in printEhFrame() 161 OutputSection *osec = nullptr; in writeMapFile() local 166 uint64_t lma = osec ? osec->getLMA() + assign->addr - osec->getVA(0) : 0; in writeMapFile() 174 osec = &cast<OutputDesc>(cmd)->osec; in writeMapFile() 175 writeHeader(ctx, os, osec->addr, osec->getLMA(), osec->size, in writeMapFile() 176 osec->addralign); in writeMapFile() 177 os << osec->name << '\n'; in writeMapFile() [all …]
|
| H A D | LinkerScript.cpp | 142 if (secRef && secRef->osec.location.empty()) { in createOutputSection() 152 sec->osec.location = std::string(location); in createOutputSection() 303 for (SectionCommand *subCmd : cast<OutputDesc>(cmd)->osec.commands) in getSymbolAssignmentValues() 340 cast<OutputDesc>(subCmd)->osec.name == name; in processInsertCommands() 351 return to != nullptr && to->osec.name == cmd.where; in processInsertCommands() 382 const OutputSection &sec = cast<OutputDesc>(cmd)->osec; in declareSymbols() 720 auto process = [this](OutputSection *osec) { in processSectionCommands() argument 721 SmallVector<InputSectionBase *, 0> v = createInputSectionList(*osec); in processSectionCommands() 725 if (osec->name == "/DISCARD/") { in processSectionCommands() 728 discardSynthetic(*osec); in processSectionCommands() [all …]
|
| H A D | Writer.cpp | 92 void addStartStopSymbols(OutputSection &osec); 312 if (osd->osec.name == name && osd->osec.partition == partition) in findSection() 313 return &osd->osec; in findSection() 521 OutputSection &osec = osd->osec; in addSectionSymbols() local 525 for (SectionCommand *cmd : osec.commands) { in addSectionSymbols() 552 /*value=*/0, /*size=*/0, &osec)); in addSectionSymbols() 667 unsigned elf::getSectionRank(Ctx &ctx, OutputSection &osec) { in getSectionRank() argument 668 unsigned rank = osec.partition * RF_PARTITION; in getSectionRank() 672 if (ctx.arg.sectionStartMap.count(osec.name)) in getSectionRank() 678 if (!(osec.flags & SHF_ALLOC)) in getSectionRank() [all …]
|
| H A D | ScriptParser.cpp | 576 osd->osec.addrExpr = addrExpr; in readOverlay() 578 osd->osec.lmaExpr = [=] { return prev->getLMA() + prev->size; }; in readOverlay() 580 osd->osec.lmaExpr = lmaExpr; in readOverlay() 583 osd->osec.usedInExpression = true; in readOverlay() 584 addrExpr = [=]() -> ExprValue { return {&osd->osec, false, 0, ""}; }; in readOverlay() 587 prev = &osd->osec; in readOverlay() 590 static_cast<OutputDesc *>(v.front())->osec.firstInOverlay = true; in readOverlay() 594 static_cast<OutputDesc *>(od)->osec.memoryRegionName = in readOverlay() 600 cmd.outputSections.push_back(static_cast<OutputDesc *>(od)->osec.name); in readOverlay() 611 max = std::max(max, cast<OutputDesc>(cmd)->osec.size); in readOverlay() [all …]
|
| H A D | OutputSections.h | 139 OutputSection osec; member 141 : SectionCommand(OutputSectionKind), osec(ctx, name, type, flags) {} in OutputDesc()
|
| H A D | Writer.h | 21 unsigned getSectionRank(Ctx &, OutputSection &osec);
|
| H A D | Relocations.cpp | 373 OutputSection *osec = (isRO ? ctx.in.bssRelRo : ctx.in.bss)->getParent(); in addCopyRelSymbol() local 377 if (osec->commands.empty() || in addCopyRelSymbol() 378 !isa<InputSectionDescription>(osec->commands.back())) in addCopyRelSymbol() 379 osec->commands.push_back(make<InputSectionDescription>("")); in addCopyRelSymbol() 380 auto *isd = cast<InputSectionDescription>(osec->commands.back()); in addCopyRelSymbol() 382 osec->commitSection(sec); in addCopyRelSymbol() 2565 static bool matchesRefTo(const NoCrossRefCommand &cmd, StringRef osec) { in matchesRefTo() argument 2567 return cmd.outputSections[0] == osec; in matchesRefTo() 2568 return llvm::is_contained(cmd.outputSections, osec); in matchesRefTo() 2573 OutputSection *osec, InputSection *sec, Rels rels) { in scanCrossRefs() argument [all …]
|
| H A D | InputSection.cpp | 418 OutputSection *osec = sections[idx]->getOutputSection(); in copyShtGroup() local 419 if (osec && seen.insert(osec->sectionIndex).second) in copyShtGroup() 420 *to++ = osec->sectionIndex; in copyShtGroup()
|
| H A D | OutputSections.cpp | 631 if (OutputSection *osec = sections[read32(ctx, &idx)]->getOutputSection()) in finalizeShtGroup() local 632 seen.insert(osec->sectionIndex); in finalizeShtGroup()
|
| H A D | ICF.cpp | 576 for (SectionCommand *subCmd : osd->osec.commands) in run()
|
| H A D | SyntheticSections.cpp | 3824 if (OutputSection *osec = getPartition(ctx).dynSymTab->getParent()) in finalizeContents() local 3825 getParent()->link = osec->sectionIndex; in finalizeContents() 4704 if (osd->osec.name == name) in findSection() 4705 return &osd->osec; in findSection()
|
| /freebsd/contrib/llvm-project/lld/ELF/Arch/ |
| H A D | ARM.cpp | 1475 for (auto &[osec, isec] : osIsPairs) { in writeARMCmseImportLib() 1476 osec->sectionIndex = ++idx; in writeARMCmseImportLib() 1477 osec->recordSection(isec); in writeARMCmseImportLib() 1478 osec->finalizeInputSections(); in writeARMCmseImportLib() 1479 osec->shName = shstrtab->addString(osec->name); in writeARMCmseImportLib() 1480 osec->size = isec->getSize(); in writeARMCmseImportLib() 1482 osec->offset = alignToPowerOf2(off, osec->addralign); in writeARMCmseImportLib() 1483 off = osec->offset + osec->size; in writeARMCmseImportLib() 1527 for (auto &[osec, _] : osIsPairs) in writeARMCmseImportLib() 1528 osec->template writeHeaderTo<ELFT>(++sHdrs); in writeARMCmseImportLib() [all …]
|
| H A D | RISCV.cpp | 681 for (OutputSection *osec : ctx.outputSections) { in initSymbolAnchors() 682 if (!(osec->flags & SHF_EXECINSTR)) in initSymbolAnchors() 684 for (InputSection *sec : getInputSections(*osec, storage)) { in initSymbolAnchors() 720 for (OutputSection *osec : ctx.outputSections) { in initSymbolAnchors() 721 if (!(osec->flags & SHF_EXECINSTR)) in initSymbolAnchors() 723 for (InputSection *sec : getInputSections(*osec, storage)) { in initSymbolAnchors() 953 for (OutputSection *osec : ctx.outputSections) { in relaxOnce() 954 if (!(osec->flags & SHF_EXECINSTR)) in relaxOnce() 956 for (InputSection *sec : getInputSections(*osec, storage)) in relaxOnce() 966 for (OutputSection *osec : ctx.outputSections) { in finalizeRelax() [all …]
|
| H A D | X86_64.cpp | 322 for (OutputSection *osec : ctx.outputSections) { in relaxOnce() 323 if (!(osec->flags & SHF_ALLOC)) in relaxOnce() 325 minVA = std::min(minVA, osec->addr); in relaxOnce() 326 maxVA = std::max(maxVA, osec->addr + osec->size); in relaxOnce() 336 for (OutputSection *osec : ctx.outputSections) { in relaxOnce() 337 if (!(osec->flags & SHF_EXECINSTR)) in relaxOnce() 339 for (InputSection *sec : getInputSections(*osec, storage)) { in relaxOnce()
|
| H A D | SystemZ.cpp | 439 for (OutputSection *osec : ctx.outputSections) { in relaxOnce() 440 if (!(osec->flags & SHF_EXECINSTR)) in relaxOnce() 442 for (InputSection *sec : getInputSections(*osec, storage)) { in relaxOnce()
|
| H A D | LoongArch.cpp | 1407 for (OutputSection *osec : ctx.outputSections) { in relaxOnce() 1408 if (!(osec->flags & SHF_EXECINSTR)) in relaxOnce() 1410 for (InputSection *sec : getInputSections(*osec, storage)) in relaxOnce() 1419 for (OutputSection *osec : ctx.outputSections) { in finalizeRelax() 1420 if (!(osec->flags & SHF_EXECINSTR)) in finalizeRelax() 1422 for (InputSection *sec : getInputSections(*osec, storage)) { in finalizeRelax()
|