Home
last modified time | relevance | path

Searched refs:isec (Results 1 – 25 of 57) sorted by relevance

123

/freebsd/contrib/llvm-project/lld/MachO/
H A DMarkLive.cpp25 InputSection *isec; member
29 WhyLiveEntry(InputSection *isec, const WhyLiveEntry *prev) in WhyLiveEntry()
30 : isec(isec), prev(prev) {} in WhyLiveEntry()
37 virtual void enqueue(InputSection *isec, uint64_t off) = 0;
52 void enqueue(InputSection *isec, uint64_t off) override { in enqueue() argument
53 enqueue(isec, off, nullptr); in enqueue()
59 void enqueue(InputSection *isec, uint64_t off, const WorklistEntry *prev);
74 InputSection *isec, uint64_t off, in enqueue() argument
76 if (isec->isLive(off)) in enqueue()
78 isec->markLive(off); in enqueue()
[all …]
H A DConcatOutputSection.cpp126 for (ConcatInputSection *isec : inputs) in needsThunks()
127 isecAddr = alignToPowerOf2(isecAddr, isec->align) + isec->getSize(); in needsThunks()
150 for (ConcatInputSection *isec : inputs) { in needsThunks()
151 for (Reloc &r : isec->relocs) { in needsThunks()
164 isec->hasCallSites = true; in needsThunks()
191 InputSection *isec = inputs[i]; in estimateBranchTargetThresholdVA() local
192 isecEnd = alignToPowerOf2(isecEnd, isec->align) + isec->getSize(); in estimateBranchTargetThresholdVA()
256 void ConcatOutputSection::finalizeOne(ConcatInputSection *isec) { in finalizeOne() argument
257 size = alignToPowerOf2(size, isec->align); in finalizeOne()
258 fileSize = alignToPowerOf2(fileSize, isec->align); in finalizeOne()
[all …]
H A DICF.cpp137 if (!da->isec() || !db->isec()) { in equalsConstant()
141 isecA = da->isec(); in equalsConstant()
143 isecB = db->isec(); in equalsConstant()
206 isecA = dyn_cast<ConcatInputSection>(da->isec()); in equalsVariable()
209 isecB = cast<ConcatInputSection>(db->isec()); in equalsVariable()
267 static Symbol *getThunkTargetSymbol(ConcatInputSection *isec) { in getThunkTargetSymbol() argument
268 for (Symbol *sym : isec->symbols) in getThunkTargetSymbol()
274 if (isec->symbols.size() == 0) in getThunkTargetSymbol()
275 thunkName = isec->getName().str() + ".icf.0"; in getThunkTargetSymbol()
277 thunkName = isec->getName().str() + "icf.thunk.target" + in getThunkTargetSymbol()
[all …]
H A DInputSection.cpp45 if (auto *isec = dyn_cast<ConcatInputSection>(inputSection)) { in addInputSection() local
46 if (isec->isCoalescedWeak()) in addInputSection()
49 ObjCMethListSection::isMethodList(isec)) { in addInputSection()
52 in.objcMethList->addInput(isec); in addInputSection()
53 isec->parent = in.objcMethList; in addInputSection()
57 sectionType(isec->getFlags()) == S_MOD_INIT_FUNC_POINTERS) { in addInputSection()
58 in.initOffsets->addInput(isec); in addInputSection()
61 isec->outSecOff = inputSectionsOrder++; in addInputSection()
62 auto *osec = ConcatOutputSection::getOrCreateForInput(isec); in addInputSection()
63 isec->parent = osec; in addInputSection()
[all …]
H A DSyntheticSections.cpp65 isec = makeSyntheticInputSection(segname, name); in SyntheticSection()
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()
287 const OutputSegment *seg = locations[i].isec->parent->parent; in finalizeContents()
289 while (j < count && locations[j].isec->parent->parent == seg) in finalizeContents()
308 const InputSection *isec, uint64_t offset, in addNonLazyBindingEntries() argument
312 in.chainedFixups->addBinding(sym, isec, offset, addend); in addNonLazyBindingEntries()
314 in.chainedFixups->addRebase(isec, offset); in addNonLazyBindingEntries()
[all …]
H A DRelocations.cpp27 return d->isec(); in getReferentInputSection()
35 if (auto *isec = dyn_cast<InputSection *>(referent)) { in getReferentString() local
36 const auto *cisec = dyn_cast<CStringInputSection>(isec); in getReferentString()
44 auto *symIsec = sym->isec(); in getReferentString()
60 const InputSection *isec, const Reloc &r) { in validateSymbolRelocation() argument
65 return (isec->getLocation(r.offset) + ": " + relocAttrs.name + in validateSymbolRelocation()
108 const ConcatInputSection *isec = osec->inputs[isecIdx]; in offsetToInputSection() local
109 if (*off < isec->outSecOff) in offsetToInputSection()
113 ConcatInputSection *isec = osec->inputs[isecIdx - 1]; in offsetToInputSection() local
114 *off -= isec->outSecOff; in offsetToInputSection()
[all …]
H A DObjC.cpp147 const ConcatInputSection *isec; member
224 nameReloc = mc.isec->getRelocAt(catLayout.nameOffset); in parseMethods()
227 const auto *roIsec = mc.isec->getRelocAt(classLayout.roDataOffset) in parseMethods()
256 formatObjAndSrcFileName(mc.isec)); in parseMethods()
299 const auto *classIsec = cast<ConcatInputSection>(classSym->isec()); in parseClass()
307 if (const auto *r = classSym->isec()->getRelocAt(classLayout.metaClassOffset)) in parseClass()
317 for (const InputSection *isec : inputSections) { in checkCategories() local
318 if (isec->getName() == section_names::objcCatList) in checkCategories()
319 for (const Reloc &r : isec->relocs) { in checkCategories()
428 void eraseISec(ConcatInputSection *isec);
[all …]
H A DBPSectionOrderer.cpp89 auto *isec = reloc.getReferentInputSection(); in getRelocHash() local
91 if (auto it = sectionToIdx.find(isec); it != sectionToIdx.end()) in getRelocHash()
94 if (isec) in getRelocHash()
95 kind = uint64_t(isec->kind()); in getRelocHash()
117 auto *isec = subsec.isec; in runBalancedPartitioning() local
118 if (!isec || isec->data.empty() || !isec->data.data()) in runBalancedPartitioning()
122 if (isa<ConcatInputSection>(isec) && !isec->isLive(0)) in runBalancedPartitioning()
125 sections.emplace_back(isec); in runBalancedPartitioning()
126 for (auto *sym : BPOrdererMachO::getSymbols(*isec)) { in runBalancedPartitioning()
H A DInputFiles.cpp366 auto *isec = make<ConcatInputSection>( in parseSections() local
368 subsections.push_back({off, isec}); in parseSections()
379 InputSection *isec = in parseSections() local
382 cast<CStringInputSection>(isec)->splitIntoPieces(); in parseSections()
383 section.subsections.push_back({0, isec}); in parseSections()
388 InputSection *isec = make<WordLiteralInputSection>(section, data, align); in parseSections() local
389 section.subsections.push_back({0, isec}); in parseSections()
411 auto *isec = make<ConcatInputSection>(section, data, align); in parseSections() local
412 if (isDebugSection(isec->getFlags()) && in parseSections()
413 isec->getSegName() == segment_names::dwarf) { in parseSections()
[all …]
H A DSymbols.cpp55 Defined::Defined(StringRef name, InputFile *file, InputSection *isec, in Defined() argument
66 weakDef(isWeakDef), external(isExternal), originalIsec(isec), 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()
120 InputSection *Defined::isec() const { in isec() function in Defined
H A DSymbolTable.cpp102 InputSection *isec, uint64_t value, in addDefined() argument
110 assert(!file || !isa<BitcodeFile>(file) || !isec); in addDefined()
122 if (auto concatIsec = dyn_cast_or_null<ConcatInputSection>(isec)) { in addDefined()
129 if (defined->isec()) in addDefined()
130 transplantSymbolsAtOffset(concatIsec, defined->isec(), in addDefined()
138 dyn_cast_or_null<ConcatInputSection>(defined->isec())) { in addDefined()
140 if (isec) in addDefined()
141 transplantSymbolsAtOffset(concatIsec, isec, defined, defined->value, in addDefined()
146 std::string srcLoc2 = isec ? isec->getSourceLocation(value) : ""; in addDefined()
211 s, name, file, isec, value, size, isWeakDef, /*isExternal=*/true, in addDefined()
[all …]
H A DSectionPriorities.cpp84 auto getOrCreateCluster = [&](const InputSection *isec) -> int { in CallGraphSort() argument
85 auto res = secToCluster.try_emplace(isec, clusters.size()); in CallGraphSort()
87 sections.push_back(isec); in CallGraphSort()
88 clusters.emplace_back(clusters.size(), isec->getSize()); in CallGraphSort()
230 const InputSection *isec = sections[i]; in run() local
234 for (Symbol *sym : isec->getFile()->symbols) { in run()
236 if (d->isec() == isec) in run()
275 sym->isec()->getFile()); in getSymbolPriority()
293 callGraphProfile[{fromSym->isec(), toSym->isec()}] += entry.count; in extractCallGraphProfile()
393 int &priority = sectionPriorities[sym->isec()]; in buildInputSectionPriorities()
[all …]
H A DSyntheticSections.h54 InputSection *isec; variable
145 const InputSection *isec; member
148 Location(const InputSection *isec, uint64_t offset) in Location()
149 : isec(isec), offset(offset) {} in Location()
150 uint64_t getVA() const { return isec->getVA(offset); } in getVA()
164 void addEntry(const InputSection *isec, uint64_t offset) { in addEntry() argument
166 locations.emplace_back(isec, offset); in addEntry()
193 void addEntry(const Symbol *dysym, const InputSection *isec, uint64_t offset,
195 bindingsMap[dysym].emplace_back(addend, Location(isec, offset));
224 void addEntry(const Symbol *symbol, const InputSection *isec, uint64_t offset,
[all …]
H A DMapFile.cpp80 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 auto printOne = [&](const ConcatInputSection *isec) { in writeMapFile() argument
206 for (Defined *sym : isec->symbols) { in writeMapFile()
H A DInputSection.h129 static bool classof(const InputSection *isec) { in classof() argument
130 return isec->kind() == ConcatKind; in classof()
162 inline bool shouldOmitFromOutput(InputSection *isec) { in shouldOmitFromOutput() argument
163 return isa<ConcatInputSection>(isec) && in shouldOmitFromOutput()
164 cast<ConcatInputSection>(isec)->shouldOmitFromOutput(); in shouldOmitFromOutput()
167 inline bool isCoalescedWeak(InputSection *isec) { in isCoalescedWeak() argument
168 return isa<ConcatInputSection>(isec) && in isCoalescedWeak()
169 cast<ConcatInputSection>(isec)->isCoalescedWeak(); in isCoalescedWeak()
237 static bool classof(const InputSection *isec) { in classof() argument
238 return isec->kind() == CStringLiteralKind; in classof()
[all …]
H A DEhFrame.h93 EhRelocator(InputSection *isec) : isec(isec) {} in EhRelocator() argument
108 InputSection *isec;
/freebsd/contrib/llvm-project/lld/ELF/
H A DThunks.cpp86 void addSymbols(ThunkSection &isec) override;
113 void addSymbols(ThunkSection &isec) override;
130 void addSymbols(ThunkSection &isec) override;
154 bool isCompatibleWith(const InputSection &isec,
189 bool isCompatibleWith(const InputSection &isec,
214 void addSymbols(ThunkSection &isec) override;
224 void addSymbols(ThunkSection &isec) override;
234 void addSymbols(ThunkSection &isec) override;
244 void addSymbols(ThunkSection &isec) override;
255 void addSymbols(ThunkSection &isec) override;
[all …]
H A DARMErrataFix.cpp208 static bool branchDestInFirstRegion(Ctx &ctx, const InputSection *isec, in branchDestInFirstRegion() argument
211 uint64_t sourceAddr = isec->getVA(0) + off; in branchDestInFirstRegion()
233 static bool patchInRange(Ctx &ctx, const InputSection *isec, uint64_t off, in patchInRange() argument
241 isBcc(instr) ? R_ARM_THM_JUMP19 : R_ARM_THM_JUMP24, isec->getVA(off), in patchInRange()
242 isec->getVA() + isec->getSize() + 0x100); in patchInRange()
259 static ScanResult scanCortexA8Errata657417(InputSection *isec, uint64_t &off, in scanCortexA8Errata657417() argument
261 Ctx &ctx = isec->getCtx(); in scanCortexA8Errata657417()
262 uint64_t isecAddr = isec->getVA(0); in scanCortexA8Errata657417()
274 const uint8_t *buf = isec->content().begin(); in scanCortexA8Errata657417()
289 auto relIt = llvm::find_if(isec->relocs(), [=](const Relocation &r) { in scanCortexA8Errata657417()
[all …]
H A DTarget.cpp93 auto *isec = dyn_cast<InputSection>(d); in getErrorPlace() local
94 if (!isec || !isec->getParent() || (isec->type & SHT_NOBITS)) in getErrorPlace()
99 ? (ctx.bufferStart + isec->getParent()->offset + isec->outSecOff) in getErrorPlace()
100 : isec->contentMaybeDecompress().data(); in getErrorPlace()
102 assert(isa<SyntheticSection>(isec) && "No data but not synthetic?"); in getErrorPlace()
105 if (isecLoc <= loc && loc < isecLoc + isec->getSize()) { in getErrorPlace()
106 std::string objLoc = isec->getLocation(loc - isecLoc); in getErrorPlace()
110 if (isec->file) in getErrorPlace()
111 msg << isec->getSrcMsg(dummy, loc - isecLoc); in getErrorPlace()
112 return {isec, objLoc + ": ", std::string(msg.str())}; in getErrorPlace()
H A DAArch64ErrataFix.cpp335 static uint64_t scanCortexA53Errata843419(InputSection *isec, uint64_t &off, in scanCortexA53Errata843419() argument
337 uint64_t isecAddr = isec->getVA(0); in scanCortexA53Errata843419()
352 const uint8_t *buf = isec->content().begin(); in scanCortexA53Errata843419()
493 for (const InputSection *isec : isd.sections) { in insertPatches() local
494 isecLimit = isec->outSecOff + isec->getSize(); in insertPatches()
531 InputSection *isec, in implementPatch() argument
547 auto relIt = llvm::find_if(isec->relocs(), [=](const Relocation &r) { in implementPatch()
550 if (relIt != isec->relocs().end() && in implementPatch()
557 auto *ps = make<Patch843419Section>(ctx, isec, patcheeOffset); in implementPatch()
564 if (relIt != isec->relocs().end()) { in implementPatch()
[all …]
H A DOutputSections.cpp105 void OutputSection::recordSection(InputSectionBase *isec) { in recordSection() argument
106 partition = isec->partition; in recordSection()
107 isec->parent = this; in recordSection()
111 isd->sectionBases.push_back(isec); in recordSection()
117 void OutputSection::commitSection(InputSection *isec) { in commitSection() argument
118 if (LLVM_UNLIKELY(type != isec->type)) { in commitSection()
120 type = isec->type; in commitSection()
121 } else if (isStaticRelSecType(type) && isStaticRelSecType(isec->type) && in commitSection()
122 (type == SHT_CREL) != (isec->type == SHT_CREL)) { in commitSection()
133 !canMergeToProgbits(ctx, isec->type)) { in commitSection()
[all …]
H A DLinkerScript.cpp53 if (auto *isec = dyn_cast<InputSection>(s)) { in getOutputSectionName() local
54 if (InputSectionBase *rel = isec->getRelocatedSection()) { in getOutputSectionName()
821 for (InputSectionBase *isec : isd->sectionBases) in processSectionCommands()
822 if (isa<PotentialSpillSection>(isec) || in processSectionCommands()
823 potentialSpillLists.contains(isec)) in processSectionCommands()
824 Err(ctx) << "section '" << isec->name in processSectionCommands()
890 static OutputDesc *createSection(Ctx &ctx, InputSectionBase *isec, in createSection() argument
893 osd->osec.recordSection(isec); in createSection()
899 InputSectionBase *isec, StringRef outsecName) { in addInputSec() argument
907 if (isec->type == SHT_GROUP || (isec->flags & SHF_GROUP)) in addInputSec()
[all …]
H A DEhFrame.cpp36 EhReader(InputSectionBase *s, ArrayRef<uint8_t> d) : isec(s), d(d) {} in EhReader()
42 Ctx &ctx = isec->file->ctx; in errOn()
44 << isec->getObjMsg((const uint8_t *)loc - isec->content().data()); in errOn()
54 InputSectionBase *isec; member in __anon15761a290111::EhReader
126 size_t size = getAugPSize(isec->getCtx(), enc); in skipAugP()
/freebsd/contrib/llvm-project/lld/MachO/Arch/
H A DARM64.cpp395 static bool applyAdrpAdd(uint8_t *buf, const ConcatInputSection *isec, in applyAdrpAdd() argument
406 uint64_t addr1 = isec->getVA() + offset1; in applyAdrpAdd()
425 static void applyAdrpAdrp(uint8_t *buf, const ConcatInputSection *isec, in applyAdrpAdrp() argument
435 uint64_t page1 = pageBits(offset1 + isec->getVA()) + adrp1.addend; in applyAdrpAdrp()
436 uint64_t page2 = pageBits(offset2 + isec->getVA()) + adrp2.addend; in applyAdrpAdrp()
452 static void applyAdrpLdr(uint8_t *buf, const ConcatInputSection *isec, in applyAdrpLdr() argument
463 uint64_t addr1 = isec->getVA() + offset1; in applyAdrpLdr()
464 uint64_t addr2 = isec->getVA() + offset2; in applyAdrpLdr()
477 static void applyAdrpLdrGot(uint8_t *buf, const ConcatInputSection *isec, in applyAdrpLdrGot() argument
483 applyAdrpAdd(buf, isec, offset1, offset2); in applyAdrpLdrGot()
[all …]
/freebsd/contrib/llvm-project/lld/include/lld/Common/
H A DBPSectionOrdererBase.inc91 const auto *isec = sections[sectionIdx];
92 D::getSectionHashes(*isec, hashes, sectionToIdx);
160 for (auto [i, isec] : llvm::enumerate(sections))
161 sectionToIdx.try_emplace(isec, i);
229 const auto *isec = sections[sectionIdx];
230 if (D::isCodeSection(*isec)) {
303 const auto *isec = sections[node.Id];
304 if (orderedSections.insert(isec)) {
305 startupSize += D::getSize(*isec);
311 const auto *isec = sections[node.Id];
[all …]

123