Lines Matching defs:isec
66 isec = makeSyntheticInputSection(segname, name);
67 isec->parent = this;
79 isec->isFinal = true;
228 loc.isec->parent->getSegmentOffset() + loc.isec->getOffset(loc.offset);
284 return a.isec->getVA(a.offset) < b.isec->getVA(b.offset);
288 const OutputSegment *seg = locations[i].isec->parent->parent;
290 while (j < count && locations[j].isec->parent->parent == seg)
309 const InputSection *isec, uint64_t offset,
313 in.chainedFixups->addBinding(sym, isec, offset, addend);
315 in.chainedFixups->addRebase(isec, offset);
322 in.binding->addEntry(dysym, isec, offset, addend);
324 in.weakBinding->addEntry(sym, isec, offset, addend);
326 in.rebase->addEntry(isec, offset);
328 in.weakBinding->addEntry(sym, isec, offset, addend);
330 in.binding->addEntry(sym, isec, offset, addend);
343 addNonLazyBindingEntries(sym, isec, sym->gotIndex * target->wordSize);
655 encodeBinding(b.target.isec->parent,
656 b.target.isec->getOffset(b.target.offset), b.addend,
689 encodeBinding(b.target.isec->parent,
690 b.target.isec->getOffset(b.target.offset), b.addend,
734 in.binding->addEntry(dysym, in.lazyPointers->isec,
736 in.weakBinding->addEntry(sym, in.lazyPointers->isec,
743 in.rebase->addEntry(in.lazyPointers->isec,
745 in.weakBinding->addEntry(sym, in.lazyPointers->isec,
830 for (ConcatInputSection *isec : inputSections) {
831 if (isec->shouldOmitFromOutput())
833 if (isec->getName() != section_names::objcSelrefs)
837 assert(isec->relocs.size() == 1);
838 auto Reloc = isec->relocs[0];
841 auto *cisec = cast<CStringInputSection>(d->isec());
843 methnameToSelref[CachedHashStringRef(methname)] = isec;
868 /*referent=*/in.objcMethnameSection->isec});
912 sym, sym->getName(), nullptr, isec,
1012 in.rebase->addEntry(in.lazyPointers->isec,
1090 const InputSection *isec = subsec.isec;
1091 if (!isCodeSection(isec))
1093 if (cast<ConcatInputSection>(isec)->shouldOmitFromOutput())
1101 const uint64_t endAddr = beginAddr + isec->getSize();
1105 {static_cast<uint32_t>(isec->getVA(it->offset - beginAddr) -
1140 if (!defined->isec() || !isCodeSection(defined->isec()) ||
1241 // We use 'originalIsec' to get the file id of the symbol since 'isec()'
1260 // of the symbol, not the canonical location returned by `isec()`.
1261 InputSection *isec = defined->originalIsec;
1262 ObjFile *file = cast<ObjFile>(isec->getFile());
1274 symStab.sect = isec->parent->index;
1278 if (isCodeSection(isec)) {
1425 nList->n_sect = defined->isec()->parent->index;
1646 void CStringSection::addInput(CStringInputSection *isec) {
1647 isec->parent = this;
1648 inputs.push_back(isec);
1649 if (isec->align > align)
1650 align = isec->align;
1654 for (const CStringInputSection *isec : inputs) {
1655 for (const auto &[i, piece] : llvm::enumerate(isec->pieces)) {
1658 StringRef string = isec->getStringRef(i);
1666 for (CStringInputSection *isec : inputs) {
1667 for (const auto &[i, piece] : llvm::enumerate(isec->pieces)) {
1673 << llvm::countr_zero(isec->align | piece.inSecOff);
1676 isec->isFinal = true;
1677 StringRef string = isec->getStringRef(i);
1724 for (const CStringInputSection *isec : inputs) {
1725 for (const auto &[i, piece] : llvm::enumerate(isec->pieces)) {
1728 auto s = isec->getCachedHashStringRef(i);
1729 assert(isec->align != 0);
1730 uint8_t trailingZeros = llvm::countr_zero(isec->align | piece.inSecOff);
1740 for (CStringInputSection *isec : inputs) {
1741 for (const auto &[i, piece] : llvm::enumerate(isec->pieces)) {
1744 auto s = isec->getCachedHashStringRef(i);
1756 isec->isFinal = true;
1788 void WordLiteralSection::addInput(WordLiteralInputSection *isec) {
1789 isec->parent = this;
1790 inputs.push_back(isec);
1794 for (WordLiteralInputSection *isec : inputs) {
1797 isec->isFinal = true;
1798 const uint8_t *buf = isec->data.data();
1799 switch (sectionType(isec->getFlags())) {
1801 for (size_t off = 0, e = isec->data.size(); off < e; off += 4) {
1802 if (!isec->isLive(off))
1810 for (size_t off = 0, e = isec->data.size(); off < e; off += 8) {
1811 if (!isec->isLive(off))
1819 for (size_t off = 0, e = isec->data.size(); off < e; off += 16) {
1820 if (!isec->isLive(off))
1937 for (const ConcatInputSection *isec : sections)
1938 count += isec->relocs.size();
1944 for (ConcatInputSection *isec : sections) {
1945 for (const Reloc &rel : isec->relocs) {
1951 fatal(isec->getLocation(rel.offset) + ": offset to initializer " +
1960 buf += isec->relocs.size() * sizeof(uint32_t);
1969 for (const ConcatInputSection *isec : sections) {
1970 for (const Reloc &rel : isec->relocs) {
1973 error(isec->getLocation(rel.offset) +
1976 error(isec->getLocation(rel.offset) +
1979 error(isec->getLocation(rel.offset) +
1984 treatUndefinedSymbol(*undefined, isec, rel.offset);
2002 for (const ConcatInputSection *isec : inputs) {
2004 readMethodListHeader(isec->data.data(), structSizeAndFlags, structCount);
2010 while (methodNameOff < isec->data.size()) {
2011 const Reloc *reloc = isec->getRelocAt(methodNameOff);
2015 auto *cisec = cast<CStringInputSection>(def->isec());
2032 for (ConcatInputSection *isec : inputs) {
2033 // We can also use sectionSize as write offset for isec
2037 isec->outSecOff = sectionSize;
2039 isec->isFinal = true;
2041 computeRelativeMethodListSize(isec->data.size());
2048 if (relativeListSize != isec->data.size()) {
2049 for (Symbol *sym : isec->symbols) {
2057 def->size == isec->data.size() &&
2059 "match isec size");
2069 for (const ConcatInputSection *isec : inputs) {
2070 assert(buf - bufStart == long(isec->outSecOff) &&
2072 uint32_t writtenSize = writeRelativeMethodList(isec, buf);
2082 bool ObjCMethListSection::isMethodList(const ConcatInputSection *isec) {
2087 if (!isec)
2089 for (const Symbol *sym : isec->symbols) {
2095 assert(def->size == isec->data.size() &&
2097 "match isec size");
2109 // (&isec->data[inSecOff]). The output is written to (&buf[outSecOff]).
2113 const ConcatInputSection *isec, uint8_t *buf, uint32_t &inSecOff,
2115 const Reloc *reloc = isec->getRelocAt(inSecOff);
2122 auto *cisec = cast<CStringInputSection>(def->isec());
2132 uint32_t currentVA = isec->getVA() + outSecOff;
2145 ObjCMethListSection::writeRelativeMethodList(const ConcatInputSection *isec,
2150 readMethodListHeader(isec->data.data(), structSizeAndFlags, structCount);
2163 isec->data.size() &&
2174 writeRelativeOffsetForIsec(isec, buf, inSecOff, outSecOff, true);
2176 writeRelativeOffsetForIsec(isec, buf, inSecOff, outSecOff, false);
2178 writeRelativeOffsetForIsec(isec, buf, inSecOff, outSecOff, false);
2181 // Expecting to have read all the data in the isec
2182 assert(inSecOff == isec->data.size() &&
2193 // isec.
2228 symtab->addSynthetic(name, in.header->isec, /*value=*/0,
2241 symtab->addSynthetic("__mh_execute_header", in.header->isec, /*value=*/0,
2245 symtab->addSynthetic("__mh_execute_header", /*isec=*/nullptr, /*value=*/0,
2290 const InputSection *isec, uint64_t offset,
2292 locations.emplace_back(isec, offset);
2475 loc.isec->parent->getSegmentOffset() + loc.isec->getOffset(loc.offset);
2478 const OutputSegment *segA = a.isec->parent->parent;
2479 const OutputSegment *segB = b.isec->parent->parent;
2486 return a.isec->parent->parent == b.isec->parent->parent;
2492 fixupSegments.emplace_back(firstLoc.isec->parent->parent);