| /freebsd-13.1/contrib/llvm-project/lld/MachO/ |
| H A D | ConcatOutputSection.cpp | 128 isecAddr = alignTo(isecAddr, isec->align) + isec->getSize(); in needsThunks() 147 ++isec->callSiteCount; in needsThunks() 173 isecEnd = alignTo(isecEnd, isec->align) + isec->getSize(); in estimateStubsInRangeVA() 196 isec->isFinal = true; in finalize() 197 isecAddr += isec->getSize(); in finalize() 203 finalizeOne(isec); in finalize() 225 assert(isec->isFinal); in finalize() 231 if (isec->callSiteCount == 0) in finalize() 295 thunkInfo.isec = in finalize() 296 make<ConcatInputSection>(isec->getSegName(), isec->getName()); in finalize() [all …]
|
| H A D | MarkLive.cpp | 38 if (isec->isLive(off)) in markLive() 40 isec->markLive(off); in markLive() 50 if (d->isec) in markLive() 51 enqueue(d->isec, d->value); in markLive() 109 enqueue(isec, 0); in markLive() 116 enqueue(isec, 0); in markLive() 129 isec->live = true; in markLive() 133 for (const Reloc &r : isec->relocs) { in markLive() 166 if (!(isec->getFlags() & S_ATTR_LIVE_SUPPORT) || isec->live) in markLive() 169 for (const Reloc &r : isec->relocs) { in markLive() [all …]
|
| H A D | ICF.cpp | 116 if (da->isec && db->isec) { in equalsConstant() 117 isecA = da->isec; in equalsConstant() 118 isecB = db->isec; in equalsConstant() 237 for (const Reloc &r : isec->relocs) { in run() 242 if (defined->isec) { in run() 243 if (auto isec = dyn_cast<ConcatInputSection>(defined->isec)) in run() local 319 Reloc &r = isec->relocs[i]; in findFunctionsWithUnwindInfo() 355 bool isHashable = (isCodeSection(isec) || isCfStringSection(isec)) && in foldIdenticalSections() 360 hashable.push_back(isec); in foldIdenticalSections() 362 isec->icfEqClass[0] = ++icfUniqueID; in foldIdenticalSections() [all …]
|
| H A D | SyntheticSections.cpp | 52 isec->parent = this; in SyntheticSection() 64 isec->isFinal = true; in MachHeaderSection() 205 return a.isec->getVA(a.offset) < b.isec->getVA(b.offset); in finalizeContents() 208 encodeRebase(loc.isec->parent, loc.isec->getOffset(loc.offset), lastRebase, in finalizeContents() 758 const InputSection *isec = subsecEntry.isec; in collectDataInCodeEntries() local 889 InputSection *isec = defined->isec; in emitStabs() local 898 return a->isec->getFile()->id < b->isec->getFile()->id; in emitStabs() 906 InputSection *isec = defined->isec; in emitStabs() local 1304 isec->parent = this; in addInput() 1307 align = isec->align; in addInput() [all …]
|
| H A D | UnwindInfoSection.cpp | 140 prepareRelocations(isec); in prepareRelocations() 147 isec->parent = compactUnwindSection; in addInput() 148 compactUnwindSection->addInput(isec); in addInput() 158 assert(!isec->shouldOmitFromOutput() && in prepareRelocations() 167 Reloc &r = isec->relocs[i]; in prepareRelocations() 173 referentIsec = isec; in prepareRelocations() 241 return cast<ConcatInputSection>(isec); in checkTextSegment() 260 memcpy(buf, isec->data.data(), isec->data.size()); in relocateCompactUnwind() 262 for (const Reloc &r : isec->relocs) { in relocateCompactUnwind() 267 checkTextSegment(defined->isec); in relocateCompactUnwind() [all …]
|
| H A D | InputSection.cpp | 219 bool macho::isCodeSection(const InputSection *isec) { in isCodeSection() argument 220 uint32_t type = sectionType(isec->getFlags()); in isCodeSection() 224 uint32_t attr = isec->getFlags() & SECTION_ATTRIBUTES_USR; in isCodeSection() 228 if (isec->getSegName() == segment_names::text) in isCodeSection() 229 return StringSwitch<bool>(isec->getName()) in isCodeSection() 236 bool macho::isCfStringSection(const InputSection *isec) { in isCfStringSection() argument 237 return isec->getName() == section_names::cfString && in isCfStringSection() 238 isec->getSegName() == segment_names::data; in isCfStringSection() 241 std::string lld::toString(const InputSection *isec) { in toString() argument 242 return (toString(isec->getFile()) + ":(" + isec->getName() + ")").str(); in toString()
|
| H A D | SymbolTable.cpp | 48 InputSection *isec, uint64_t value, in addDefined() argument 58 assert(!isWeakDef || (isa<BitcodeFile>(file) && !isec) || in addDefined() 59 (isa<ObjFile>(file) && file == isec->getFile())); in addDefined() 76 if (auto concatIsec = dyn_cast_or_null<ConcatInputSection>(isec)) in addDefined() 95 s, name, file, isec, value, size, isWeakDef, /*isExternal=*/true, in addDefined() 189 Defined *SymbolTable::addSynthetic(StringRef name, InputSection *isec, in addSynthetic() argument 193 Defined *s = addDefined(name, nullptr, isec, value, /*size=*/0, in addSynthetic() 228 osec = ssec->isec->parent; in handleSectionBoundarySymbol() 239 isec->live = true; in handleSectionBoundarySymbol() 243 osec = isec->parent = ConcatOutputSection::getOrCreateForInput(isec); in handleSectionBoundarySymbol() [all …]
|
| H A D | InputSection.h | 123 static bool classof(const InputSection *isec) { in classof() argument 124 return isec->kind() == ConcatKind; in classof() 154 inline bool shouldOmitFromOutput(InputSection *isec) { in shouldOmitFromOutput() argument 155 return isa<ConcatInputSection>(isec) && in shouldOmitFromOutput() 159 inline bool isCoalescedWeak(InputSection *isec) { in isCoalescedWeak() argument 160 return isa<ConcatInputSection>(isec) && in isCoalescedWeak() 161 cast<ConcatInputSection>(isec)->isCoalescedWeak(); in isCoalescedWeak() 222 static bool classof(const InputSection *isec) { in classof() argument 223 return isec->kind() == CStringLiteralKind; in classof() 240 static bool classof(const InputSection *isec) { in classof() argument [all …]
|
| H A D | InputFiles.cpp | 260 InputSection *isec; in parseSections() local 262 isec = in parseSections() 283 auto *isec = in parseSections() local 314 return it->isec; in findContainingSubsection() 530 name, isec->getFile(), isec, value, size, sym.n_desc & N_WEAK_DEF, in createDefined() 538 name, isec->getFile(), isec, value, size, sym.n_desc & N_WEAK_DEF, in createDefined() 634 InputSection *isec = subsecMap.back().isec; in parseSymbols() local 650 symbols[symIndex] = createDefined(sym, name, isec, 0, isec->getSize()); in parseSymbols() 667 InputSection *isec = subsecEntry.isec; in parseSymbols() local 699 isec->data = isec->data.slice(0, symbolOffset); in parseSymbols() [all …]
|
| H A D | MapFile.cpp | 49 ret[dr->isec].push_back(dr); in getSectionSyms() 70 if (d->isLive() && d->isec && d->getFile() == file) { in getSymbols() 71 assert(!shouldOmitFromOutput(d->isec)); in getSymbols() 147 for (InputSection *isec : inputSections) { in writeMapFile() 148 auto symsIt = sectionSyms.find(isec); in writeMapFile() 149 assert(!shouldOmitFromOutput(isec) || (symsIt == sectionSyms.end())); in writeMapFile()
|
| H A D | Dwarf.cpp | 28 for (const InputSection *isec : obj->debugSections) { in create() local 30 StringSwitch<StringRef *>(isec->getName()) in create() 35 *s = toStringRef(isec->data); in create()
|
| H A D | SyntheticSections.h | 54 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.push_back({isec, offset}); in addEntry() 192 void addEntry(const DylibSymbol *dysym, const InputSection *isec, 194 bindingsMap[dysym].emplace_back(addend, Location(isec, offset)); 223 void addEntry(const Symbol *symbol, const InputSection *isec, uint64_t offset, [all …]
|
| H A D | Writer.cpp | 578 in.binding->addEntry(dysym, in.lazyPointers->isec, in prepareBranchTarget() 589 in.rebase->addEntry(in.lazyPointers->isec, in prepareBranchTarget() 637 ConcatInputSection *isec = inputSections[i]; in scanRelocations() local 639 if (isec->shouldOmitFromOutput()) in scanRelocations() 642 for (auto it = isec->relocs.begin(); it != isec->relocs.end(); ++it) { in scanRelocations() 656 prepareSymbolRelocation(sym, isec, r); in scanRelocations() 664 in.rebase->addEntry(isec, r.offset); in scanRelocations() 860 size_t &priority = sectionPriorities[sym.isec]; in buildInputSectionPriorities() 936 for (ConcatInputSection *isec : inputSections) { in createOutputSections() 937 if (isec->shouldOmitFromOutput()) in createOutputSections() [all …]
|
| H A D | Symbols.h | 115 Defined(StringRefZ name, InputFile *file, InputSection *isec, uint64_t value, in Defined() argument 118 : Symbol(DefinedKind, name, file), isec(isec), value(value), size(size), in Defined() 123 if (auto concatIsec = dyn_cast_or_null<ConcatInputSection>(isec)) in Defined() 132 return !isAbsolute() && isThreadLocalVariables(isec->getFlags()); in isTlv() 136 bool isAbsolute() const { return isec == nullptr; } in isAbsolute() 142 InputSection *isec; variable
|
| H A D | Symbols.cpp | 45 return d->isec->canonical()->isLive(d->value); in isLive() 62 if (!isec->canonical()->isFinal) { in getVA() 73 return isec->canonical()->getVA(value); in getVA()
|
| H A D | Relocations.cpp | 21 const InputSection *isec, const Reloc &r) { in validateSymbolRelocation() argument 24 auto message = [relocAttrs, sym, isec, &valid](const Twine &diagnostic) { in validateSymbolRelocation() 27 sym->getName() + "' in " + toString(isec)) in validateSymbolRelocation()
|
| /freebsd-13.1/contrib/llvm-project/lld/ELF/ |
| H A D | Thunks.cpp | 456 STT_FUNC, 0, isec); in addSymbols() 482 0, isec); in addSymbols() 582 STT_FUNC, 0, isec); in addSymbols() 600 STT_FUNC, 1, isec); in addSymbols() 621 0, isec); in addSymbols() 683 0, isec); in addSymbols() 757 isec); in addSymbols() 873 isec); in addSymbols() 1004 isec); in addSymbols() 1040 isec); in addSymbols() [all …]
|
| H A D | ARMErrataFix.cpp | 210 uint64_t sourceAddr = isec->getVA(0) + off; in branchDestInFirstRegion() 240 isec->getVA() + isec->getSize() + 0x100); in patchInRange() 259 uint64_t isecAddr = isec->getVA(0); in scanCortexA8Errata657417() 271 const uint8_t *buf = isec->data().begin(); in scanCortexA8Errata657417() 291 if (relIt != isec->relocations.end()) in scanCortexA8Errata657417() 298 warn(toString(isec->file) + in scanCortexA8Errata657417() 381 isecLimit = isec->outSecOff + isec->getSize(); in insertPatches() 476 isec->relocations.push_back( in implementPatch() 489 for (InputSection *isec : isd.sections) { in patchInputSectionDescription() 491 if (isa<SyntheticSection>(isec)) in patchInputSectionDescription() [all …]
|
| H A D | OutputSections.cpp | 101 partition = isec->partition; in recordSection() 102 isec->parent = this; in recordSection() 118 type = isec->type; in commitSection() 119 entsize = isec->entsize; in commitSection() 120 flags = isec->flags; in commitSection() 128 if (type != isec->type) { in commitSection() 141 isec->parent = this; in commitSection() 156 if (entsize != isec->entsize) in commitSection() 350 isec->writeTo<ELFT>(buf); in writeTo() 354 uint8_t *start = buf + isec->outSecOff + isec->getSize(); in writeTo() [all …]
|
| H A D | Target.cpp | 97 auto *isec = cast<InputSection>(d); in getErrPlace() local 98 if (!isec->getParent() || (isec->type & SHT_NOBITS)) in getErrPlace() 103 ? (Out::bufferStart + isec->getParent()->offset + isec->outSecOff) in getErrPlace() 104 : isec->data().data(); in getErrPlace() 106 assert(isa<SyntheticSection>(isec) && "No data but not synthetic?"); in getErrPlace() 109 if (isecLoc <= loc && loc < isecLoc + isec->getSize()) in getErrPlace() 110 return {isec, isec->template getLocation<ELFT>(loc - isecLoc) + ": "}; in getErrPlace()
|
| H A D | AArch64ErrataFix.cpp | 339 uint64_t isecAddr = isec->getVA(0); in scanCortexA53Errata843419() 354 const uint8_t *buf = isec->data().begin(); in scanCortexA53Errata843419() 495 for (const InputSection *isec : isd.sections) { in insertPatches() local 496 isecLimit = isec->outSecOff + isec->getSize(); in insertPatches() 533 InputSection *isec, in implementPatch() argument 552 if (relIt != isec->relocations.end() && in implementPatch() 559 auto *ps = make<Patch843419Section>(isec, patcheeOffset); in implementPatch() 566 if (relIt != isec->relocations.end()) { in implementPatch() 581 for (InputSection *isec : isd.sections) { in patchInputSectionDescription() 583 if (isa<SyntheticSection>(isec)) in patchInputSectionDescription() [all …]
|
| H A D | Relocations.cpp | 107 if (errPlace.isec && errPlace.isec->name.startswith(".debug")) in reportRangeError() 1060 Partition &part = isec->getPartition(); in addRelativeReloc() 1809 uint64_t thunkSecOff = isec->outSecOff; in getISDThunkSec() 1812 thunkSecOff = isec->outSecOff + isec->getSize(); in getISDThunkSec() 1816 isec->getObjMsg(src - (os->addr + isec->outSecOff))); in getISDThunkSec() 1830 OutputSection *tos = isec->getParent(); in getISThunkSec() 1839 if (isec->outSecOff < first->outSecOff || last->outSecOff < isec->outSecOff) in getISThunkSec() 1843 thunkedSections[isec] = ts; in getISThunkSec() 1887 isecLimit = isec->outSecOff + isec->getSize(); in createInitialThunkSections() 1987 t->isCompatibleWith(*isec, rel) && in getThunk() [all …]
|
| H A D | MapFile.cpp | 184 for (InputSection *isec : isd->sections) { in writeMapFile() 185 if (auto *ehSec = dyn_cast<EhFrameSection>(isec)) { in writeMapFile() 190 writeHeader(os, isec->getVA(0), osec->getLMA() + isec->getOffset(0), in writeMapFile() 191 isec->getSize(), isec->alignment); in writeMapFile() 192 os << indent8 << toString(isec) << '\n'; in writeMapFile() 193 for (Symbol *sym : sectionSyms[isec]) in writeMapFile()
|
| H A D | LinkerScript.cpp | 666 sec->recordSection(isec); in createSection() 680 if (isec->type == SHT_GROUP || (isec->flags & SHF_GROUP)) in addInputSec() 681 return createSection(isec, outsecName); in addInputSec() 689 if (!isa<SyntheticSection>(isec) && in addInputSec() 690 (isec->type == SHT_REL || isec->type == SHT_RELA)) { in addInputSec() 691 auto *sec = cast<InputSection>(isec); in addInputSec() 747 if (sec->partition != isec->partition) in addInputSec() 766 sec->recordSection(isec); in addInputSec() 808 for (InputSectionBase *isec : inputSections) { in addOrphanSections() 815 if (auto *sec = dyn_cast<InputSection>(isec)) in addOrphanSections() [all …]
|
| H A D | Writer.cpp | 692 if (!isec) in markUsedLocalSymbols() 694 if (isec->type == SHT_REL) in markUsedLocalSymbols() 810 if (isec->type == SHT_REL || isec->type == SHT_RELA) in addSectionSymbols() 816 if (isa<SyntheticSection>(isec) && !(isec->flags & SHF_MERGE)) in addSectionSymbols() 1116 if (isec->isLive() && isa<InputSection>(isec) && (isec->flags & SHF_ALLOC)) in forEachRelSec() 1117 fn(*isec); in forEachRelSec() 1402 auto i = order.find(isec); in sortISDBySectionOrder() 1451 isd->sections.push_back(isec); in sortISDBySectionOrder() 1694 sections.push_back(isec); in resolveShfLinkOrder() 1918 [=](const InputSectionBase *isec) { return isec == ss; }); in removeUnusedSyntheticSections() argument [all …]
|