Home
last modified time | relevance | path

Searched refs:osec (Results 1 – 22 of 22) sorted by relevance

/llvm-project-15.0.7/lld/MachO/
H A DOutputSegment.cpp50 count += (!osec->isHidden() ? 1 : 0); in numNonHiddenSections()
57 osec->parent = this; in addOutputSection()
58 sections.push_back(osec); in addOutputSection()
62 osec->align = sectAlign.align; in addOutputSection()
83 StringRef segname = osec->parent->name; in sectionOrder()
86 return StringSwitch<int>(osec->name) in sectionOrder()
93 .Default(osec->inputOrder); in sectionOrder()
103 switch (sectionType(osec->flags)) { in sectionOrder()
117 .Default(osec->inputOrder); in sectionOrder()
132 .Default(osec->inputOrder); in sectionOrder()
[all …]
H A DWriter.cpp251 if (osec->isHidden()) in writeTo()
257 memcpy(sectHdr->sectname, osec->name.data(), osec->name.size()); in writeTo()
895 if (isThreadLocalData(osec->flags) && osec->align > tlvAlign) in sortSegmentsAndSections()
952 osec->addInput(isec); in createOutputSections()
953 osec->inputOrder = in createOutputSections()
1054 if (osec) in finalizeLinkEditSegment()
1056 [](LinkEditSection *osec) { osec->finalizeContents(); }, osec)); in finalizeLinkEditSegment() argument
1077 osec->addr = addr; in assignAddresses()
1078 osec->fileOff = isZeroFill(osec->flags) ? 0 : fileOff; in assignAddresses()
1079 osec->finalize(); in assignAddresses()
[all …]
H A DRelocations.cpp68 auto *osec = cast<ConcatOutputSection>(sections[osecIdx - 1]); in offsetToInputSection() local
69 *off -= osec->fileOff; in offsetToInputSection()
72 for (; isecIdx < osec->inputs.size(); ++isecIdx) { in offsetToInputSection()
73 const ConcatInputSection *isec = osec->inputs[isecIdx]; in offsetToInputSection()
78 ConcatInputSection *isec = osec->inputs[isecIdx - 1]; in offsetToInputSection()
H A DMapFile.cpp146 for (OutputSection *osec : seg->getSections()) { in writeMapFile()
147 if (osec->isHidden()) in writeMapFile()
150 os << format("0x%08llX\t0x%08llX\t%s\t%s\n", osec->addr, osec->getSize(), in writeMapFile()
151 seg->name.str().c_str(), osec->name.str().c_str()); in writeMapFile()
H A DConcatOutputSection.cpp408 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 DSymbolTable.cpp282 OutputSection *osec = nullptr; in handleSectionBoundarySymbol() local
286 osec = ssec->isec->parent; in handleSectionBoundarySymbol()
290 if (!osec) { in handleSectionBoundarySymbol()
301 osec = isec->parent = ConcatOutputSection::getOrCreateForInput(isec); in handleSectionBoundarySymbol()
306 osec->sectionStartSymbols.push_back(createBoundarySymbol(sym)); in handleSectionBoundarySymbol()
308 osec->sectionEndSymbols.push_back(createBoundarySymbol(sym)); in handleSectionBoundarySymbol()
H A DInputSection.cpp302 auto *osec = cast<WordLiteralSection>(parent); in getOffset() local
306 return osec->getLiteral4Offset(buf + (off & ~3LLU)) | (off & 3); in getOffset()
308 return osec->getLiteral8Offset(buf + (off & ~7LLU)) | (off & 7); in getOffset()
310 return osec->getLiteral16Offset(buf + (off & ~15LLU)) | (off & 15); in getOffset()
H A DDriver.cpp547 ConcatOutputSection *osec = nullptr; in replaceCommonSymbols() local
562 if (!osec) in replaceCommonSymbols()
563 osec = ConcatOutputSection::getOrCreateForInput(isec); in replaceCommonSymbols()
564 isec->parent = osec; in replaceCommonSymbols()
1090 ConcatOutputSection *osec = nullptr; in gatherInputSections() local
1096 if (!osec) in gatherInputSections()
1097 osec = ConcatOutputSection::getOrCreateForInput(isec); in gatherInputSections()
1098 isec->parent = osec; in gatherInputSections()
H A DSyntheticSections.cpp145 for (const OutputSection *osec : seg->getSections()) { in writeTo() local
146 if (isThreadLocalVariables(osec->flags)) { in writeTo()
373 static void encodeBinding(const OutputSection *osec, uint64_t outSecOff, in encodeBinding() argument
376 OutputSegment *seg = osec->parent; in encodeBinding()
377 uint64_t offset = osec->getSegmentOffset() + outSecOff; in encodeBinding()
/llvm-project-15.0.7/lld/ELF/
H A DMapFile.cpp97 OutputSection *osec = syms[i]->getOutputSection(); in getSymbolStrings() local
99 uint64_t lma = osec ? osec->getLMA() + vma - osec->getVA(0) : 0; in getSymbolStrings()
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->alignment); in writeMapFile()
173 os << osec->name << '\n'; in writeMapFile()
176 for (SectionCommand *subCmd : osec->commands) { in writeMapFile()
194 writeHeader(os, osec->addr + data->offset, in writeMapFile()
[all …]
H A DWriter.cpp276 if (osd->osec.name == name && osd->osec.partition == partition) in findSection()
277 return &osd->osec; in findSection()
725 OutputSection &osec = osd->osec; in addSectionSymbols() local
1422 osec.sortInitFini(); in sortSection()
1466 osd->osec.sortRank = getSectionRank(osd->osec); in sortSections()
1708 OutputSection *osec = &osd->osec; in finalizeAddressDependentContent() local
1709 if (osec->addr % osec->alignment != 0) in finalizeAddressDependentContent()
2031 OutputSection *osec = &osd->osec; in finalizeSections() local
2034 osec->shName = in.shStrTab->addString(osec->name); in finalizeSections()
2611 osec->offset = alignToPowerOf2(off, osec->alignment); in assignFileOffsets()
[all …]
H A DLinkerScript.cpp612 osec->commands.clear(); in processSectionCommands()
626 osec->commands.clear(); in processSectionCommands()
633 if (osec->subalignExpr) { in processSectionCommands()
642 osec->partition = 1; in processSectionCommands()
651 OutputSection *osec = &osd->osec; in processSectionCommands() local
652 if (process(osec) && in processSectionCommands()
658 OutputSection *osec = &osd->osec; in processSectionCommands() local
660 log(overwrite->osec.location + " overwrites " + osec->name); in processSectionCommands()
672 if (osd->osec.partition == 1 && osd->osec.sectionIndex == UINT32_MAX) in processSectionCommands()
708 return &osd->osec; in findByName()
[all …]
H A DScriptParser.cpp549 prev = &osd->osec; in readOverlay()
597 osd->osec.relro = false; in readSections()
889 osd->osec.inOverlay = true; in readOverlaySectionDescription()
904 OutputSection *osec = &cmd->osec; in readOutputSectionDescription() local
977 if (osec->lmaExpr && !osec->lmaRegionName.empty()) in readOutputSectionDescription()
985 osec->filler = readFill(); in readOutputSectionDescription()
1383 OutputSection *osec = &script->getOrCreateOutputSection(name)->osec; in readPrimary() local
1408 OutputSection *osec = &script->getOrCreateOutputSection(name)->osec; in readPrimary() local
1411 return osec->alignment; in readPrimary()
1466 OutputSection *osec = &script->getOrCreateOutputSection(name)->osec; in readPrimary() local
[all …]
H A DOutputSections.h125 OutputSection osec; member
127 : SectionCommand(OutputSectionKind), osec(name, type, flags) {} in OutputDesc()
H A DRelocations.cpp365 OutputSection *osec = (isRO ? in.bssRelRo : in.bss)->getParent(); in addCopyRelSymbol() local
369 if (osec->commands.empty() || in addCopyRelSymbol()
370 !isa<InputSectionDescription>(osec->commands.back())) in addCopyRelSymbol()
371 osec->commands.push_back(make<InputSectionDescription>("")); in addCopyRelSymbol()
372 auto *isd = cast<InputSectionDescription>(osec->commands.back()); in addCopyRelSymbol()
374 osec->commitSection(sec); in addCopyRelSymbol()
H A DInputSection.cpp326 OutputSection *osec = sections[idx]->getOutputSection(); in copyShtGroup() local
327 if (osec && seen.insert(osec->sectionIndex).second) in copyShtGroup()
328 *to++ = osec->sectionIndex; in copyShtGroup()
H A DOutputSections.cpp477 if (OutputSection *osec = sections[read32(&idx)]->getOutputSection()) in finalizeShtGroup() local
478 seen.insert(osec->sectionIndex); in finalizeShtGroup()
H A DICF.cpp572 for (SectionCommand *subCmd : osd->osec.commands) in run()
H A DDriver.cpp2780 osd->osec.finalizeInputSections(); in link()
/llvm-project-15.0.7/lld/wasm/
H A DMapFile.cpp126 for (OutputSection *osec : outputSections) { in writeMapFile()
127 writeHeader(os, -1, osec->getOffset(), osec->getSize()); in writeMapFile()
128 os << toString(*osec) << '\n'; in writeMapFile()
129 if (auto *code = dyn_cast<CodeSection>(osec)) { in writeMapFile()
137 } else if (auto *data = dyn_cast<DataSection>(osec)) { in writeMapFile()
153 } else if (auto *globals = dyn_cast<GlobalSection>(osec)) { in writeMapFile()
/llvm-project-15.0.7/lld/ELF/Arch/
H A DRISCV.cpp506 for (OutputSection *osec : outputSections) { in initSymbolAnchors()
507 if (!(osec->flags & SHF_EXECINSTR)) in initSymbolAnchors()
509 for (InputSection *sec : getInputSections(*osec, storage)) { in initSymbolAnchors()
537 for (OutputSection *osec : outputSections) { in initSymbolAnchors()
538 if (!(osec->flags & SHF_EXECINSTR)) in initSymbolAnchors()
540 for (InputSection *sec : getInputSections(*osec, storage)) { in initSymbolAnchors()
706 for (OutputSection *osec : outputSections) { in relaxOnce()
707 if (!(osec->flags & SHF_EXECINSTR)) in relaxOnce()
709 for (InputSection *sec : getInputSections(*osec, storage)) in relaxOnce()
719 for (OutputSection *osec : outputSections) { in riscvFinalizeRelax()
[all …]
/llvm-project-15.0.7/llvm/test/tools/llvm-objcopy/ELF/
H A Dwildcard-flags.test26 # RUN: llvm-objcopy --strip-all --only-section='.f*' %t.o %t.osec.1.o
27 # RUN: llvm-readobj --sections %t.osec.1.o \