| /freebsd-14.2/contrib/llvm-project/lld/MachO/ |
| H A D | MarkLive.cpp | 27 InputSection *isec; member 32 : isec(isec), prev(prev) {} in WhyLiveEntry() 55 enqueue(isec, off, nullptr); in enqueue() 78 if (isec->isLive(off)) in enqueue() 80 isec->markLive(off); in enqueue() 113 if (d->isec) in addSym() 124 return entry->isec; in getInputSection() 132 InputSection *isec, in makeEntry() argument 135 if (!isec) { in makeEntry() 141 return isec; in makeEntry() [all …]
|
| H A D | ConcatOutputSection.cpp | 129 isecAddr = alignToPowerOf2(isecAddr, isec->align) + isec->getSize(); in needsThunks() 175 isecEnd = alignToPowerOf2(isecEnd, isec->align) + isec->getSize(); in estimateStubsInRangeVA() 199 isec->outSecOff = size; in finalizeOne() 200 isec->isFinal = true; in finalizeOne() 201 size += isec->getSize(); in finalizeOne() 207 finalizeOne(isec); in finalizeContents() 213 finalizeOne(isec); in finalize() 323 thunkInfo.isec = in finalize() 324 makeSyntheticInputSection(isec->getSegName(), isec->getName()); in finalize() 365 isec->writeTo(buf + isec->outSecOff); in writeTo() [all …]
|
| H A D | ICF.cpp | 136 if (!da->isec || !db->isec) { in equalsConstant() 140 isecA = da->isec; in equalsConstant() 142 isecB = db->isec; in equalsConstant() 292 if (defined->isec) { in run() 371 if (d->isec) in markSymAsAddrSig() 372 d->isec->keepUnique = true; in markSymAsAddrSig() 387 const InputSection *isec = addrSigSection->subsections[0].isec; in markAddrSigSymbols() local 428 !isec->keepUnique && !isec->hasAltEntry && in foldIdenticalSections() 431 foldable.push_back(isec); in foldIdenticalSections() 448 isec->data = copy; in foldIdenticalSections() [all …]
|
| H A D | Symbols.cpp | 66 weakDef(isWeakDef), external(isExternal), isec(isec), value(value), in Defined() 68 if (isec) { in Defined() 69 isec->symbols.push_back(this); in Defined() 71 for (auto it = isec->symbols.rbegin(), rend = isec->symbols.rend(); in Defined() 94 if (!isec->isFinal) { in getVA() 105 return isec->getVA(value); in getVA() 109 return isec ? dyn_cast_or_null<ObjFile>(isec->getFile()) : nullptr; in getObjectFile() 115 if (isec) in canonicalize() 116 isec = isec->canonical(); in canonicalize() 120 if (!isec) in getSourceLocation() [all …]
|
| H A D | InputSection.cpp | 78 if (subsec.isec == this) { in getLocation() 99 if (subsec.isec == this) { in getSourceLocation() 238 section.subsections.push_back({0, isec}); in makeSyntheticInputSection() 239 return isec; in makeSyntheticInputSection() 322 uint32_t type = sectionType(isec->getFlags()); in isCodeSection() 330 if (isec->getSegName() == segment_names::text) in isCodeSection() 331 return StringSwitch<bool>(isec->getName()) in isCodeSection() 340 isec->getSegName() == segment_names::data; in isCfStringSection() 345 isec->getSegName() == segment_names::data; in isClassRefsSection() 350 isec->getSegName() == segment_names::data; in isSelRefsSection() [all …]
|
| H A D | Relocations.cpp | 27 return d->isec; in getReferentInputSection() 35 const InputSection *isec, const Reloc &r) { in validateSymbolRelocation() argument 40 return (isec->getLocation(r.offset) + ": " + relocAttrs.name + in validateSymbolRelocation() 83 const ConcatInputSection *isec = osec->inputs[isecIdx]; in offsetToInputSection() local 84 if (*off < isec->outSecOff) in offsetToInputSection() 88 ConcatInputSection *isec = osec->inputs[isecIdx - 1]; in offsetToInputSection() local 89 *off -= isec->outSecOff; in offsetToInputSection() 90 return isec; in offsetToInputSection() 99 const InputSection *isec = offsetToInputSection(&off); in reportRangeError() local 100 std::string locStr = isec ? isec->getLocation(off) : "(invalid location)"; in reportRangeError()
|
| H A D | SyntheticSections.cpp | 66 isec->parent = this; in SyntheticSection() 78 isec->isFinal = true; in MachHeaderSection() 227 loc.isec->parent->getSegmentOffset() + loc.isec->getOffset(loc.offset); in encodeRebases() 283 return a.isec->getVA(a.offset) < b.isec->getVA(b.offset); in finalizeContents() 1027 const InputSection *isec = subsec.isec; in collectDataInCodeEntries() local 1077 if (!defined->isec || !isCodeSection(defined->isec) || in finalizeContents() 1193 InputSection *isec = defined->isec; in emitStabs() local 1582 isec->parent = this; in addInput() 1585 align = isec->align; in addInput() 1724 isec->parent = this; in addInput() [all …]
|
| H A D | InputFiles.cpp | 483 return it->isec; in findContainingSubsection() 722 name, isec->getFile(), isec, value, size, sym.n_desc & N_WEAK_DEF, in createDefined() 728 name, isec->getFile(), isec, value, size, sym.n_desc & N_WEAK_DEF, in createDefined() 882 InputSection *isec = subsec.isec; in parseSymbols() local 914 isec->data = isec->data.slice(0, symbolOffset); in parseSymbols() 949 isec->live = true; in OpaqueFile() 1157 for (auto it = isec->relocs.begin(); it != isec->relocs.end();) { in registerCompactUnwind() 1351 if (pcSym->isec == isec) { in targetSymFromCanonicalSubtractor() 1393 auto *isec = cast<ConcatInputSection>(subsec.isec); in registerEhFrames() local 1400 make<Defined>("EH_Frame", isec->getFile(), isec, /*value=*/0, in registerEhFrames() [all …]
|
| H A D | SymbolTable.cpp | 83 d->isec = toIsec; in transplantSymbolsAtOffset() 105 assert(!file || !isa<BitcodeFile>(file) || !isec); in addDefined() 124 if (defined->isec) in addDefined() 135 if (isec) in addDefined() 141 std::string srcLoc2 = isec ? isec->getSourceLocation(value) : ""; in addDefined() 334 assert(!isec || !isec->getFile()); // See makeSyntheticInputSection(). in addSynthetic() 369 osec = ssec->isec->parent; in handleSectionBoundarySymbol() 380 isec->live = true; in handleSectionBoundarySymbol() 384 osec = isec->parent = ConcatOutputSection::getOrCreateForInput(isec); in handleSectionBoundarySymbol() 385 inputSections.push_back(isec); in handleSectionBoundarySymbol() [all …]
|
| H A D | MapFile.cpp | 80 if (d->isec && d->getFile() == file && in gatherMapInfo() 81 !isa<CStringInputSection>(d->isec)) { in gatherMapInfo() 93 if (auto isec = dyn_cast<CStringInputSection>(subsec.isec)) { in gatherMapInfo() local 94 auto &liveCStrings = info.liveCStringsForSection[isec->parent]; in gatherMapInfo() 95 for (const auto &[i, piece] : llvm::enumerate(isec->pieces)) { in gatherMapInfo() 97 liveCStrings.push_back({isec->parent->addr + piece.outSecOff, in gatherMapInfo() 98 {fileIndex, isec->getStringRef(i)}}); in gatherMapInfo() 100 info.deadCStrings.push_back({fileIndex, isec->getStringRef(i)}); in gatherMapInfo() 205 for (const InputSection *isec : concatOsec->inputs) { in writeMapFile() local 206 for (Defined *sym : isec->symbols) in writeMapFile()
|
| H A D | ObjC.cpp | 138 const ConcatInputSection *isec; member 181 if (auto *isec = r.referent.dyn_cast<InputSection *>()) in getReferentString() local 182 return cast<CStringInputSection>(isec)->getStringRefAtOffset(r.addend); in getReferentString() 224 nameReloc = mc.isec->getRelocAt(catLayout.nameOffset); in parseMethods() 227 const auto *roIsec = mc.isec->getRelocAt(classLayout.roDataOffset) in parseMethods() 245 toString(mc.isec->getFile())); in parseMethods() 288 const auto *classIsec = cast<ConcatInputSection>(classSym->isec); in parseClass() 296 if (const auto *r = classSym->isec->getRelocAt(classLayout.metaClassOffset)) in parseClass() 304 for (const InputSection *isec : inputSections) { in checkCategories() local 305 if (isec->getName() == section_names::objcCatList) in checkCategories() [all …]
|
| H A D | InputSection.h | 128 static bool classof(const InputSection *isec) { in classof() argument 129 return isec->kind() == ConcatKind; in classof() 160 inline bool shouldOmitFromOutput(InputSection *isec) { in shouldOmitFromOutput() argument 161 return isa<ConcatInputSection>(isec) && in shouldOmitFromOutput() 165 inline bool isCoalescedWeak(InputSection *isec) { in isCoalescedWeak() argument 166 return isa<ConcatInputSection>(isec) && in isCoalescedWeak() 167 cast<ConcatInputSection>(isec)->isCoalescedWeak(); in isCoalescedWeak() 235 static bool classof(const InputSection *isec) { in classof() argument 236 return isec->kind() == CStringLiteralKind; in classof() 258 static bool classof(const InputSection *isec) { in classof() argument [all …]
|
| H A D | SectionPriorities.cpp | 85 auto getOrCreateCluster = [&](const InputSection *isec) -> int { in CallGraphSort() argument 86 auto res = secToCluster.try_emplace(isec, clusters.size()); in CallGraphSort() 88 sections.push_back(isec); in CallGraphSort() 89 clusters.emplace_back(clusters.size(), isec->getSize()); in CallGraphSort() 233 const InputSection *isec = sections[i]; in run() local 237 for (Symbol *sym : isec->getFile()->symbols) { in run() 239 if (d->isec == isec) in run() 261 const InputFile *f = sym->isec->getFile(); in getSymbolPriority() 290 callGraphProfile[{fromSym->isec, toSym->isec}] += entry.count; in extractCallGraphProfile() 373 size_t &priority = sectionPriorities[sym->isec]; in buildInputSectionPriorities()
|
| H A D | SyntheticSections.h | 53 InputSection *isec; variable 144 const InputSection *isec; member 147 Location(const InputSection *isec, uint64_t offset) in Location() 148 : isec(isec), offset(offset) {} in Location() 149 uint64_t getVA() const { return isec->getVA(offset); } in getVA() 163 void addEntry(const InputSection *isec, uint64_t offset) { in addEntry() argument 165 locations.emplace_back(isec, offset); in addEntry() 330 void finalize() override { isec->isFinal = true; } in finalize() 666 void addInput(ConcatInputSection *isec) { sections.push_back(isec); } in addInput() argument 729 void addRebase(const InputSection *isec, uint64_t offset) { in addRebase() argument [all …]
|
| H A D | EhFrame.h | 93 EhRelocator(InputSection *isec) : isec(isec) {} in EhRelocator() argument 108 InputSection *isec;
|
| H A D | Dwarf.cpp | 28 for (const InputSection *isec : obj->debugSections) { in create() local 30 StringSwitch<StringRef *>(isec->getName()) in create() 37 *s = toStringRef(isec->data); in create()
|
| /freebsd-14.2/contrib/llvm-project/lld/ELF/ |
| H A D | Thunks.cpp | 549 STT_FUNC, 0, isec); in addSymbols() 576 STT_FUNC, 0, isec); in addSymbols() 680 STT_FUNC, 0, isec); in addSymbols() 697 STT_FUNC, 1, isec); in addSymbols() 715 STT_FUNC, 0, isec); in addSymbols() 735 STT_FUNC, 1, isec); in addSymbols() 755 STT_FUNC, 1, isec); in addSymbols() 961 isec); in addSymbols() 977 isec); in addSymbols() 1096 isec); in addSymbols() [all …]
|
| H A D | ARMErrataFix.cpp | 208 uint64_t sourceAddr = isec->getVA(0) + off; in branchDestInFirstRegion() 238 isec->getVA() + isec->getSize() + 0x100); in patchInRange() 257 uint64_t isecAddr = isec->getVA(0); in scanCortexA8Errata657417() 269 const uint8_t *buf = isec->content().begin(); in scanCortexA8Errata657417() 289 if (relIt != isec->relocs().end()) in scanCortexA8Errata657417() 296 warn(toString(isec->file) + in scanCortexA8Errata657417() 377 for (const InputSection *isec : isd.sections) { in insertPatches() local 378 isecLimit = isec->outSecOff + isec->getSize(); in insertPatches() 485 for (InputSection *isec : isd.sections) { in patchInputSectionDescription() 487 if (isa<SyntheticSection>(isec)) in patchInputSectionDescription() [all …]
|
| H A D | Target.cpp | 101 auto *isec = dyn_cast<InputSection>(d); in getErrorPlace() local 102 if (!isec || !isec->getParent() || (isec->type & SHT_NOBITS)) in getErrorPlace() 107 ? (Out::bufferStart + isec->getParent()->offset + isec->outSecOff) in getErrorPlace() 108 : isec->contentMaybeDecompress().data(); in getErrorPlace() 110 assert(isa<SyntheticSection>(isec) && "No data but not synthetic?"); in getErrorPlace() 113 if (isecLoc <= loc && loc < isecLoc + isec->getSize()) { in getErrorPlace() 114 std::string objLoc = isec->getLocation(loc - isecLoc); in getErrorPlace() 118 return {isec, objLoc + ": ", in getErrorPlace() 119 isec->file ? isec->getSrcMsg(dummy, loc - isecLoc) : ""}; in getErrorPlace()
|
| H A D | AArch64ErrataFix.cpp | 339 uint64_t isecAddr = isec->getVA(0); in scanCortexA53Errata843419() 354 const uint8_t *buf = isec->content().begin(); in scanCortexA53Errata843419() 494 for (const InputSection *isec : isd.sections) { in insertPatches() local 495 isecLimit = isec->outSecOff + isec->getSize(); in insertPatches() 532 InputSection *isec, in implementPatch() argument 551 if (relIt != isec->relocs().end() && in implementPatch() 558 auto *ps = make<Patch843419Section>(isec, patcheeOffset); in implementPatch() 565 if (relIt != isec->relocs().end()) { in implementPatch() 579 for (InputSection *isec : isd.sections) { in patchInputSectionDescription() 581 if (isa<SyntheticSection>(isec)) in patchInputSectionDescription() [all …]
|
| H A D | OutputSections.cpp | 105 partition = isec->partition; in recordSection() 106 isec->parent = this; in recordSection() 137 type = isec->type; in commitSection() 144 entsize = isec->entsize; in commitSection() 145 flags = isec->flags; in commitSection() 150 toString(isec) + ": 0x" + utohexstr(isec->flags) + in commitSection() 154 isec->parent = this; in commitSection() 169 if (entsize != isec->entsize) in commitSection() 499 isec->writeTo<ELFT>(buf + isec->outSecOff); in writeTo() 505 convertArmInstructionstoBE8(isec, buf + isec->outSecOff); in writeTo() [all …]
|
| H A D | LinkerScript.cpp | 721 osd->osec.recordSection(isec); in createSection() 734 if (isec->type == SHT_GROUP || (isec->flags & SHF_GROUP)) in addInputSec() 743 if (!isa<SyntheticSection>(isec) && in addInputSec() 744 (isec->type == SHT_REL || isec->type == SHT_RELA)) { in addInputSec() 745 auto *sec = cast<InputSection>(isec); in addInputSec() 820 sec->recordSection(isec); in addInputSec() 860 ctx.inputSections[n++] = isec; in addOrphanSections() 872 add(isec); in addOrphanSections() 1079 assert(isec->getParent() == sec); in assignOffsets() 1082 isec->outSecOff = dot - sec->addr; in assignOffsets() [all …]
|
| H A D | Relocations.cpp | 121 if (errPlace.isec && errPlace.isec->name.starts_with(".debug")) in reportRangeError() 872 Partition &part = isec.getPartition(); in addRelativeReloc() 901 {&isec, offsetInSec}); in addRelativeReloc() 2016 uint64_t thunkSecOff = isec->outSecOff; in getISDThunkSec() 2019 thunkSecOff = isec->outSecOff + isec->getSize(); in getISDThunkSec() 2023 isec->getObjMsg(src - (os->addr + isec->outSecOff))); in getISDThunkSec() 2037 OutputSection *tos = isec->getParent(); in getISThunkSec() 2046 if (isec->outSecOff < first->outSecOff || last->outSecOff < isec->outSecOff) in getISThunkSec() 2050 thunkedSections[isec] = ts; in getISThunkSec() 2094 isecLimit = isec->outSecOff + isec->getSize(); in createInitialThunkSections() [all …]
|
| H A D | MapFile.cpp | 178 for (InputSection *isec : isd->sections) { in writeMapFile() 179 if (auto *ehSec = dyn_cast<EhFrameSection>(isec)) { in writeMapFile() 184 writeHeader(os, isec->getVA(), osec->getLMA() + isec->outSecOff, in writeMapFile() 185 isec->getSize(), isec->addralign); in writeMapFile() 186 os << indent8 << toString(isec) << '\n'; in writeMapFile() 187 for (Symbol *sym : llvm::make_first_range(sectionSyms[isec])) in writeMapFile()
|
| /freebsd-14.2/contrib/llvm-project/lld/MachO/Arch/ |
| H A D | ARM64.cpp | 376 uint64_t addr1 = isec->getVA() + offset1; in applyAdrpAdd() 432 uint64_t addr1 = isec->getVA() + offset1; in applyAdrpLdr() 433 uint64_t addr2 = isec->getVA() + offset2; in applyAdrpLdr() 452 applyAdrpAdd(buf, isec, offset1, offset2); in applyAdrpLdrGot() 488 uint64_t addr1 = isec->getVA() + offset1; in applyAdrpAddLdr() 489 uint64_t addr3 = isec->getVA() + offset3; in applyAdrpAddLdr() 563 uint64_t addr1 = isec->getVA() + offset1; in applyAdrpLdrGotLdr() 564 uint64_t addr2 = isec->getVA() + offset2; in applyAdrpLdrGotLdr() 649 const ConcatInputSection *isec = in applyOptimizationHints() local 651 if (!isec || isec->shouldOmitFromOutput()) in applyOptimizationHints() [all …]
|