/freebsd/contrib/llvm-project/lld/MachO/ |
H A D | MapFile.cpp | 138 const OutputSection *osec, size_t entrySize) { in printStubsEntries() argument 141 osec->addr + sym->stubsIndex * entrySize, entrySize, in printStubsEntries() 147 NonLazyPointerSectionBase *osec) { in printNonLazyPointerSection() argument 152 for (const Symbol *sym : osec->getEntries()) in printNonLazyPointerSection() 154 osec->addr + sym->gotIndex * target->wordSize, in printNonLazyPointerSection() 198 for (OutputSection *osec : seg->getSections()) { in writeMapFile() 199 if (osec->isHidden()) in writeMapFile() 202 os << format("0x%08llX\t0x%08llX\t%s\t%s\n", osec->addr, osec->getSize(), in writeMapFile() 203 seg->name.str().c_str(), osec->name.str().c_str()); in writeMapFile() 222 for (const OutputSection *osec : seg->getSections()) { in writeMapFile() local [all …]
|
H A D | OutputSegment.cpp | 55 for (const OutputSection *osec : sections) in numNonHiddenSections() local 56 count += (!osec->isHidden() ? 1 : 0); in numNonHiddenSections() 60 void OutputSegment::addOutputSection(OutputSection *osec) { in addOutputSection() argument 61 inputOrder = std::min(inputOrder, osec->inputOrder); in addOutputSection() 63 osec->parent = this; in addOutputSection() 64 sections.push_back(osec); in addOutputSection() 67 if (sectAlign.segName == name && sectAlign.sectName == osec->name) in addOutputSection() 68 osec->align = sectAlign.align; in addOutputSection() 88 static int sectionOrder(OutputSection *osec) { in sectionOrder() argument 89 StringRef segname = osec->parent->name; in sectionOrder() [all …]
|
H A D | Writer.cpp | 250 for (const OutputSection *osec : seg->getSections()) { in writeTo() local 251 if (osec->isHidden()) in writeTo() 257 memcpy(sectHdr->sectname, osec->name.data(), osec->name.size()); in writeTo() 260 sectHdr->addr = osec->addr; in writeTo() 261 sectHdr->offset = osec->fileOff; in writeTo() 262 sectHdr->align = Log2_32(osec->align); in writeTo() 263 sectHdr->flags = osec->flags; in writeTo() 264 sectHdr->size = osec->getSize(); in writeTo() 265 sectHdr->reserved1 = osec->reserved1; in writeTo() 266 sectHdr->reserved2 = osec->reserved2; in writeTo() [all …]
|
H A D | Relocations.cpp | 78 auto *osec = cast<ConcatOutputSection>(sections[osecIdx - 1]); in offsetToInputSection() local 79 *off -= osec->fileOff; in offsetToInputSection() 82 for (; isecIdx < osec->inputs.size(); ++isecIdx) { in offsetToInputSection() 83 const ConcatInputSection *isec = osec->inputs[isecIdx]; in offsetToInputSection() 88 ConcatInputSection *isec = osec->inputs[isecIdx - 1]; in offsetToInputSection()
|
H A D | ConcatOutputSection.cpp | 408 ConcatOutputSection *&osec = concatOutputSections[names]; in getOrCreateForInput() local 409 if (!osec) { in getOrCreateForInput() 413 osec = make<TextOutputSection>(names.second); in getOrCreateForInput() 415 osec = make<ConcatOutputSection>(names.second); in getOrCreateForInput() 417 return osec; in getOrCreateForInput()
|
H A D | InputSection.cpp | 63 auto *osec = ConcatOutputSection::getOrCreateForInput(isec); in addInputSection() local 64 isec->parent = osec; in addInputSection() 354 auto *osec = cast<WordLiteralSection>(parent); in getOffset() local 358 return osec->getLiteral4Offset(buf + (off & ~3LLU)) | (off & 3); in getOffset() 360 return osec->getLiteral8Offset(buf + (off & ~7LLU)) | (off & 7); in getOffset() 362 return osec->getLiteral16Offset(buf + (off & ~15LLU)) | (off & 15); in getOffset()
|
H A D | SymbolTable.cpp | 365 OutputSection *osec = nullptr; in handleSectionBoundarySymbol() local 369 osec = ssec->isec->parent; in handleSectionBoundarySymbol() 373 if (!osec) { in handleSectionBoundarySymbol() 384 osec = isec->parent = ConcatOutputSection::getOrCreateForInput(isec); in handleSectionBoundarySymbol() 389 osec->sectionStartSymbols.push_back(createBoundarySymbol(sym)); in handleSectionBoundarySymbol() 391 osec->sectionEndSymbols.push_back(createBoundarySymbol(sym)); in handleSectionBoundarySymbol()
|
H A D | SyntheticSections.cpp | 150 for (const OutputSection *osec : seg->getSections()) { in writeTo() local 151 if (isThreadLocalVariables(osec->flags)) { in writeTo() 430 static void encodeBinding(const OutputSection *osec, uint64_t outSecOff, in encodeBinding() argument 433 OutputSegment *seg = osec->parent; in encodeBinding() 434 uint64_t offset = osec->getSegmentOffset() + outSecOff; in encodeBinding()
|
H A D | Driver.cpp | 630 ConcatOutputSection *osec = nullptr; in replaceCommonSymbols() local 645 if (!osec) in replaceCommonSymbols() 646 osec = ConcatOutputSection::getOrCreateForInput(isec); in replaceCommonSymbols() 647 isec->parent = osec; in replaceCommonSymbols()
|
/freebsd/contrib/llvm-project/lld/ELF/ |
H A D | MapFile.cpp | 97 OutputSection *osec = syms[i]->getOutputSection(); in getSymbolStrings() local 99 uint64_t lma = osec ? osec->getLMA() + vma - osec->getVA(0) : 0; in getSymbolStrings() 140 const OutputSection *osec = sec->getOutputSection(); in printEhFrame() local 142 writeHeader(os, osec->addr + p.outputOff, osec->getLMA() + p.outputOff, in printEhFrame() 160 OutputSection *osec = nullptr; in writeMapFile() local 165 uint64_t lma = osec ? osec->getLMA() + assign->addr - osec->getVA(0) : 0; in writeMapFile() 171 osec = &cast<OutputDesc>(cmd)->osec; in writeMapFile() 172 writeHeader(os, osec->addr, osec->getLMA(), osec->size, osec->addralign); in writeMapFile() 173 os << osec->name << '\n'; in writeMapFile() 176 for (SectionCommand *subCmd : osec->commands) { in writeMapFile() [all …]
|
H A D | Writer.cpp | 87 void addStartStopSymbols(OutputSection &osec); 298 if (osd->osec.name == name && osd->osec.partition == partition) in findSection() 299 return &osd->osec; in findSection() 503 OutputSection &osec = osd->osec; in addSectionSymbols() local 507 for (SectionCommand *cmd : osec.commands) { in addSectionSymbols() 534 /*value=*/0, /*size=*/0, &osec)); in addSectionSymbols() 647 unsigned elf::getSectionRank(OutputSection &osec) { in getSectionRank() argument 648 unsigned rank = osec.partition * RF_PARTITION; in getSectionRank() 652 if (config->sectionStartMap.count(osec.name)) in getSectionRank() 658 if (!(osec.flags & SHF_ALLOC)) in getSectionRank() [all …]
|
H A D | LinkerScript.cpp | 138 if (secRef && secRef->osec.location.empty()) { in createOutputSection() 146 sec->osec.location = std::string(location); in createOutputSection() 280 for (SectionCommand *subCmd : cast<OutputDesc>(cmd)->osec.commands) in getSymbolAssignmentValues() 316 cast<OutputDesc>(subCmd)->osec.name == name; in processInsertCommands() 327 return to != nullptr && to->osec.name == cmd.where; in processInsertCommands() 356 const OutputSection &sec = cast<OutputDesc>(cmd)->osec; in declareSymbols() 655 auto process = [this](OutputSection *osec) { in processSectionCommands() argument 656 SmallVector<InputSectionBase *, 0> v = createInputSectionList(*osec); in processSectionCommands() 660 if (osec->name == "/DISCARD/") { in processSectionCommands() 663 discardSynthetic(*osec); in processSectionCommands() [all …]
|
H A D | ScriptParser.cpp | 586 osd->osec.addrExpr = addrExpr; in readOverlay() 588 osd->osec.lmaExpr = [=] { return prev->getLMA() + prev->size; }; in readOverlay() 590 osd->osec.lmaExpr = lmaExpr; in readOverlay() 593 osd->osec.usedInExpression = true; in readOverlay() 594 addrExpr = [=]() -> ExprValue { return {&osd->osec, false, 0, ""}; }; in readOverlay() 597 prev = &osd->osec; in readOverlay() 607 max = std::max(max, cast<OutputDesc>(cmd)->osec.size); in readOverlay() 645 osd->osec.relro = false; in readSections() 664 names.push_back(os->osec.name); in readSections() 951 osd->osec.inOverlay = true; in readOverlaySectionDescription() [all …]
|
H A D | Relocations.cpp | 385 OutputSection *osec = (isRO ? in.bssRelRo : in.bss)->getParent(); in addCopyRelSymbol() local 389 if (osec->commands.empty() || in addCopyRelSymbol() 390 !isa<InputSectionDescription>(osec->commands.back())) in addCopyRelSymbol() 391 osec->commands.push_back(make<InputSectionDescription>("")); in addCopyRelSymbol() 392 auto *isd = cast<InputSectionDescription>(osec->commands.back()); in addCopyRelSymbol() 394 osec->commitSection(sec); in addCopyRelSymbol() 2401 static bool matchesRefTo(const NoCrossRefCommand &cmd, StringRef osec) { in matchesRefTo() argument 2403 return cmd.outputSections[0] == osec; in matchesRefTo() 2404 return llvm::is_contained(cmd.outputSections, osec); in matchesRefTo() 2408 static void scanCrossRefs(const NoCrossRefCommand &cmd, OutputSection *osec, in scanCrossRefs() argument [all …]
|
H A D | OutputSections.h | 137 OutputSection osec; member 139 : SectionCommand(OutputSectionKind), osec(name, type, flags) {} in OutputDesc()
|
H A D | Writer.h | 49 unsigned getSectionRank(OutputSection &osec);
|
H A D | InputSection.cpp | 386 OutputSection *osec = sections[idx]->getOutputSection(); in copyShtGroup() local 387 if (osec && seen.insert(osec->sectionIndex).second) in copyShtGroup() 388 *to++ = osec->sectionIndex; in copyShtGroup()
|
H A D | OutputSections.cpp | 612 if (OutputSection *osec = sections[read32(&idx)]->getOutputSection()) in finalizeShtGroup() local 613 seen.insert(osec->sectionIndex); in finalizeShtGroup()
|
H A D | ICF.cpp | 582 for (SectionCommand *subCmd : osd->osec.commands) in run()
|
H A D | SyntheticSections.cpp | 4631 if (osd->osec.name == name) in findSection() 4632 return &osd->osec; in findSection()
|
H A D | Driver.cpp | 3169 osd->osec.finalizeInputSections(&script.s); in link()
|
/freebsd/contrib/llvm-project/lld/ELF/Arch/ |
H A D | ARM.cpp | 1468 for (auto &[osec, isec] : osIsPairs) { in writeARMCmseImportLib() 1469 osec->sectionIndex = ++idx; in writeARMCmseImportLib() 1470 osec->recordSection(isec); in writeARMCmseImportLib() 1471 osec->finalizeInputSections(); in writeARMCmseImportLib() 1472 osec->shName = shstrtab->addString(osec->name); in writeARMCmseImportLib() 1473 osec->size = isec->getSize(); in writeARMCmseImportLib() 1475 osec->offset = alignToPowerOf2(off, osec->addralign); in writeARMCmseImportLib() 1476 off = osec->offset + osec->size; in writeARMCmseImportLib() 1520 for (auto &[osec, _] : osIsPairs) in writeARMCmseImportLib() 1521 osec->template writeHeaderTo<ELFT>(++sHdrs); in writeARMCmseImportLib() [all …]
|
H A D | RISCV.cpp | 683 for (OutputSection *osec : outputSections) { in initSymbolAnchors() 684 if (!(osec->flags & SHF_EXECINSTR)) in initSymbolAnchors() 686 for (InputSection *sec : getInputSections(*osec, storage)) { in initSymbolAnchors() 722 for (OutputSection *osec : outputSections) { in initSymbolAnchors() 723 if (!(osec->flags & SHF_EXECINSTR)) in initSymbolAnchors() 725 for (InputSection *sec : getInputSections(*osec, storage)) { in initSymbolAnchors() 925 for (OutputSection *osec : outputSections) { in relaxOnce() 926 if (!(osec->flags & SHF_EXECINSTR)) in relaxOnce() 928 for (InputSection *sec : getInputSections(*osec, storage)) in relaxOnce() 938 for (OutputSection *osec : outputSections) { in finalizeRelax() [all …]
|
H A D | X86_64.cpp | 313 for (OutputSection *osec : outputSections) { in relaxOnce() 314 minVA = std::min(minVA, osec->addr); in relaxOnce() 315 maxVA = std::max(maxVA, osec->addr + osec->size); in relaxOnce() 325 for (OutputSection *osec : outputSections) { in relaxOnce() 326 if (!(osec->flags & SHF_EXECINSTR)) in relaxOnce() 328 for (InputSection *sec : getInputSections(*osec, storage)) { in relaxOnce()
|
H A D | LoongArch.cpp | 831 for (OutputSection *osec : outputSections) { in relaxOnce() 832 if (!(osec->flags & SHF_EXECINSTR)) in relaxOnce() 834 for (InputSection *sec : getInputSections(*osec, storage)) in relaxOnce() 843 for (OutputSection *osec : outputSections) { in finalizeRelax() 844 if (!(osec->flags & SHF_EXECINSTR)) in finalizeRelax() 846 for (InputSection *sec : getInputSections(*osec, storage)) { in finalizeRelax()
|