| /openbsd-src/gnu/llvm/lld/MachO/ |
| H A D | MarkLive.cpp | 27 InputSection *isec; member 31 WhyLiveEntry(InputSection *isec, const WhyLiveEntry *prev) in WhyLiveEntry() 32 : isec(isec), prev(prev) {} in WhyLiveEntry() 39 virtual void enqueue(InputSection *isec, uint64_t off) = 0; 54 void enqueue(InputSection *isec, uint64_t off) override { in enqueue() argument 55 enqueue(isec, off, nullptr); in enqueue() 61 void enqueue(InputSection *isec, uint64_t off, const WorklistEntry *prev); 76 InputSection *isec, uint64_t off, in enqueue() argument 78 if (isec->isLive(off)) in enqueue() 80 isec->markLive(off); in enqueue() [all …]
|
| H A D | ConcatOutputSection.cpp | 128 for (ConcatInputSection *isec : inputs) in needsThunks() 129 isecAddr = alignTo(isecAddr, isec->align) + isec->getSize(); in needsThunks() 134 for (ConcatInputSection *isec : inputs) { in needsThunks() 135 for (Reloc &r : isec->relocs) { in needsThunks() 148 isec->hasCallSites = true; in needsThunks() 174 InputSection *isec = inputs[i]; in estimateStubsInRangeVA() local 175 isecEnd = alignTo(isecEnd, isec->align) + isec->getSize(); in estimateStubsInRangeVA() 196 void ConcatOutputSection::finalizeOne(ConcatInputSection *isec) { in finalizeOne() argument 197 size = alignTo(size, isec->align); in finalizeOne() 198 fileSize = alignTo(fileSize, isec->align); in finalizeOne() [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() 194 isecA = dyn_cast<ConcatInputSection>(da->isec); in equalsVariable() 197 isecB = cast<ConcatInputSection>(db->isec); in equalsVariable() 287 parallelForEach(icfInputs, [&](ConcatInputSection *isec) { in run() argument 288 uint32_t hash = isec->icfEqClass[icfPass % 2]; in run() 289 for (const Reloc &r : isec->relocs) { in run() 292 if (defined->isec) { in run() 294 dyn_cast<ConcatInputSection>(defined->isec)) in run() [all …]
|
| H A D | Symbols.cpp | 55 Defined::Defined(StringRefZ name, InputFile *file, InputSection *isec, in Defined() argument 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() 85 return !isAbsolute() && isThreadLocalVariables(isec->getFlags()); in isTlv() 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() [all …]
|
| H A D | InputSection.cpp | 78 if (subsec.isec == this) { in getLocation() 99 if (subsec.isec == this) { in getSourceLocation() 229 auto isec = make<ConcatInputSection>(section, data, align); in makeSyntheticInputSection() local 230 section.subsections.push_back({0, isec}); in makeSyntheticInputSection() 231 return isec; in makeSyntheticInputSection() 304 bool macho::isCodeSection(const InputSection *isec) { in isCodeSection() argument 305 uint32_t type = sectionType(isec->getFlags()); in isCodeSection() 309 uint32_t attr = isec->getFlags() & SECTION_ATTRIBUTES_USR; in isCodeSection() 313 if (isec->getSegName() == segment_names::text) in isCodeSection() 314 return StringSwitch<bool>(isec->getName()) in isCodeSection() [all …]
|
| H A D | SyntheticSections.cpp | 72 isec = makeSyntheticInputSection(segname, name); in SyntheticSection() 73 isec->parent = this; in SyntheticSection() 85 isec->isFinal = true; in MachHeaderSection() 234 loc.isec->parent->getSegmentOffset() + loc.isec->getOffset(loc.offset); in encodeRebases() 290 return a.isec->getVA(a.offset) < b.isec->getVA(b.offset); in finalizeContents() 294 const OutputSegment *seg = locations[i].isec->parent->parent; in finalizeContents() 296 while (j < count && locations[j].isec->parent->parent == seg) in finalizeContents() 315 const InputSection *isec, uint64_t offset, in addNonLazyBindingEntries() argument 319 in.chainedFixups->addBinding(sym, isec, offset, addend); in addNonLazyBindingEntries() 321 in.chainedFixups->addRebase(isec, offset); in addNonLazyBindingEntries() [all …]
|
| H A D | Relocations.cpp | 25 const InputSection *isec, const Reloc &r) { in validateSymbolRelocation() argument 30 return (isec->getLocation(r.offset) + ": " + relocAttrs.name + in validateSymbolRelocation() 73 const ConcatInputSection *isec = osec->inputs[isecIdx]; in offsetToInputSection() local 74 if (*off < isec->outSecOff) in offsetToInputSection() 78 ConcatInputSection *isec = osec->inputs[isecIdx - 1]; in offsetToInputSection() local 79 *off -= isec->outSecOff; in offsetToInputSection() 80 return isec; in offsetToInputSection() 89 const InputSection *isec = offsetToInputSection(&off); in reportRangeError() local 90 std::string locStr = isec ? isec->getLocation(off) : "(invalid location)"; in reportRangeError()
|
| H A D | InputFiles.cpp | 346 auto *isec = make<ConcatInputSection>( in parseSections() local 348 subsections.push_back({off, isec}); in parseSections() 359 InputSection *isec = in parseSections() local 362 cast<CStringInputSection>(isec)->splitIntoPieces(); in parseSections() 363 section.subsections.push_back({0, isec}); in parseSections() 368 InputSection *isec = make<WordLiteralInputSection>(section, data, align); in parseSections() local 369 section.subsections.push_back({0, isec}); in parseSections() 391 auto *isec = make<ConcatInputSection>(section, data, align); in parseSections() local 392 if (isDebugSection(isec->getFlags()) && in parseSections() 393 isec->getSegName() == segment_names::dwarf) { in parseSections() [all …]
|
| H A D | SymbolTable.cpp | 65 InputSection *isec, uint64_t value, in addDefined() argument 73 assert(!file || !isa<BitcodeFile>(file) || !isec); in addDefined() 86 if (auto concatIsec = dyn_cast_or_null<ConcatInputSection>(isec)) in addDefined() 94 dyn_cast_or_null<ConcatInputSection>(defined->isec)) { in addDefined() 100 std::string srcLoc2 = isec ? isec->getSourceLocation(value) : ""; in addDefined() 127 s, name, file, isec, value, size, isWeakDef, /*isExternal=*/true, in addDefined() 137 return addDefined(target, newFile, src->isec, src->value, src->size, in aliasDefined() 252 Defined *SymbolTable::addSynthetic(StringRef name, InputSection *isec, in addSynthetic() argument 256 assert(!isec || !isec->getFile()); // See makeSyntheticInputSection(). in addSynthetic() 258 addDefined(name, /*file=*/nullptr, isec, value, /*size=*/0, in addSynthetic() [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() 194 for (const InputSection *isec : concatOsec->inputs) { in writeMapFile() local 195 for (Defined *sym : isec->symbols) in writeMapFile()
|
| H A D | InputSection.h | 126 static bool classof(const InputSection *isec) { in classof() argument 127 return isec->kind() == ConcatKind; in classof() 158 inline bool shouldOmitFromOutput(InputSection *isec) { in shouldOmitFromOutput() argument 159 return isa<ConcatInputSection>(isec) && in shouldOmitFromOutput() 160 cast<ConcatInputSection>(isec)->shouldOmitFromOutput(); in shouldOmitFromOutput() 163 inline bool isCoalescedWeak(InputSection *isec) { in isCoalescedWeak() argument 164 return isa<ConcatInputSection>(isec) && in isCoalescedWeak() 165 cast<ConcatInputSection>(isec)->isCoalescedWeak(); in isCoalescedWeak() 229 static bool classof(const InputSection *isec) { in classof() argument 230 return isec->kind() == CStringLiteralKind; in classof() [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.push_back({isec, offset}); in addEntry() 192 void addEntry(const Symbol *dysym, const InputSection *isec, uint64_t offset, 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 | 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()
|
| /openbsd-src/gnu/llvm/lld/ELF/ |
| H A D | Thunks.cpp | 53 void addSymbols(ThunkSection &isec) override; 61 void addSymbols(ThunkSection &isec) override; 79 bool isCompatibleWith(const InputSection &isec, 111 bool isCompatibleWith(const InputSection &isec, 133 void addSymbols(ThunkSection &isec) override; 142 void addSymbols(ThunkSection &isec) override; 152 void addSymbols(ThunkSection &isec) override; 161 void addSymbols(ThunkSection &isec) override; 172 void addSymbols(ThunkSection &isec) override; 182 void addSymbols(ThunkSection &isec) override; [all …]
|
| H A D | ARMErrataFix.cpp | 206 static bool branchDestInFirstRegion(const InputSection *isec, uint64_t off, in branchDestInFirstRegion() argument 208 uint64_t sourceAddr = isec->getVA(0) + off; in branchDestInFirstRegion() 229 static bool patchInRange(const InputSection *isec, uint64_t off, in patchInRange() argument 237 isBcc(instr) ? R_ARM_THM_JUMP19 : R_ARM_THM_JUMP24, isec->getVA(off), in patchInRange() 238 isec->getVA() + isec->getSize() + 0x100); in patchInRange() 255 static ScanResult scanCortexA8Errata657417(InputSection *isec, uint64_t &off, in scanCortexA8Errata657417() argument 257 uint64_t isecAddr = isec->getVA(0); in scanCortexA8Errata657417() 269 const uint8_t *buf = isec->content().begin(); in scanCortexA8Errata657417() 284 auto relIt = llvm::find_if(isec->relocs(), [=](const Relocation &r) { in scanCortexA8Errata657417() 289 if (relIt != isec->relocs().end()) in scanCortexA8Errata657417() [all …]
|
| H A D | Target.cpp | 97 auto *isec = dyn_cast<InputSection>(d); in getErrorPlace() local 98 if (!isec || !isec->getParent() || (isec->type & SHT_NOBITS)) in getErrorPlace() 103 ? (Out::bufferStart + isec->getParent()->offset + isec->outSecOff) in getErrorPlace() 104 : isec->contentMaybeDecompress().data(); in getErrorPlace() 106 assert(isa<SyntheticSection>(isec) && "No data but not synthetic?"); in getErrorPlace() 109 if (isecLoc <= loc && loc < isecLoc + isec->getSize()) { in getErrorPlace() 110 std::string objLoc = isec->getLocation(loc - isecLoc); in getErrorPlace() 114 return {isec, objLoc + ": ", in getErrorPlace() 115 isec->file ? isec->getSrcMsg(dummy, loc - isecLoc) : ""}; in getErrorPlace()
|
| H A D | AArch64ErrataFix.cpp | 336 static uint64_t scanCortexA53Errata843419(InputSection *isec, uint64_t &off, in scanCortexA53Errata843419() argument 338 uint64_t isecAddr = isec->getVA(0); in scanCortexA53Errata843419() 353 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>(isec, patcheeOffset); in implementPatch() 564 if (relIt != isec->relocs().end()) { in implementPatch() [all …]
|
| H A D | OutputSections.cpp | 102 void OutputSection::recordSection(InputSectionBase *isec) { in recordSection() argument 103 partition = isec->partition; in recordSection() 104 isec->parent = this; in recordSection() 108 isd->sectionBases.push_back(isec); in recordSection() 114 void OutputSection::commitSection(InputSection *isec) { in commitSection() argument 115 if (LLVM_UNLIKELY(type != isec->type)) { in commitSection() 118 !canMergeToProgbits(isec->type)) { in commitSection() 124 diagnose("section type mismatch for " + isec->name + "\n>>> " + in commitSection() 125 toString(isec) + ": " + in commitSection() 126 getELFSectionTypeName(config->emachine, isec->type) + in commitSection() [all …]
|
| H A D | LinkerScript.cpp | 60 if (auto *isec = dyn_cast<InputSection>(s)) { in getOutputSectionName() local 61 if (InputSectionBase *rel = isec->getRelocatedSection()) { in getOutputSectionName() 713 static OutputDesc *createSection(InputSectionBase *isec, StringRef outsecName) { in createSection() argument 715 osd->osec.recordSection(isec); in createSection() 720 InputSectionBase *isec, StringRef outsecName) { in addInputSec() argument 728 if (isec->type == SHT_GROUP || (isec->flags & SHF_GROUP)) in addInputSec() 729 return createSection(isec, outsecName); in addInputSec() 737 if (!isa<SyntheticSection>(isec) && in addInputSec() 738 (isec->type == SHT_REL || isec->type == SHT_RELA)) { in addInputSec() 739 auto *sec = cast<InputSection>(isec); in addInputSec() [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()
|
| /openbsd-src/gnu/usr.bin/binutils-2.17/ld/emultempl/ |
| H A D | sh64elf.em | 97 asection *isec; 98 for (isec = f->the_bfd->sections; 99 isec != NULL; 100 isec = isec->next) 102 if (elf_section_data (isec)->this_hdr.sh_flags 148 asection *isec; 150 for (isec = f->the_bfd->sections; 151 isec != NULL; 152 isec = isec->next) 154 if (isec->output_section == osec [all …]
|
| /openbsd-src/gnu/usr.bin/binutils/ld/emultempl/ |
| H A D | sh64elf.em | 97 asection *isec; 98 for (isec = f->the_bfd->sections; 99 isec != NULL; 100 isec = isec->next) 102 if (elf_section_data (isec)->this_hdr.sh_flags 148 asection *isec; 150 for (isec = f->the_bfd->sections; 151 isec != NULL; 152 isec = isec->next) 154 if (isec->output_section == osec [all …]
|
| /openbsd-src/gnu/llvm/lld/MachO/Arch/ |
| H A D | ARM64.cpp | 334 static void applyAdrpAdd(uint8_t *buf, const ConcatInputSection *isec, in applyAdrpAdd() argument 345 uint64_t addr1 = isec->getVA() + offset1; in applyAdrpAdd() 363 static void applyAdrpAdrp(uint8_t *buf, const ConcatInputSection *isec, in applyAdrpAdrp() argument 373 uint64_t page1 = pageBits(offset1 + isec->getVA()) + adrp1.addend; in applyAdrpAdrp() 374 uint64_t page2 = pageBits(offset2 + isec->getVA()) + adrp2.addend; in applyAdrpAdrp() 390 static void applyAdrpLdr(uint8_t *buf, const ConcatInputSection *isec, in applyAdrpLdr() argument 401 uint64_t addr1 = isec->getVA() + offset1; in applyAdrpLdr() 402 uint64_t addr2 = isec->getVA() + offset2; in applyAdrpLdr() 415 static void applyAdrpLdrGot(uint8_t *buf, const ConcatInputSection *isec, in applyAdrpLdrGot() argument 421 applyAdrpAdd(buf, isec, offset1, offset2); in applyAdrpLdrGot() [all …]
|