Lines Matching refs:sym
323 std::string InputSectionBase::getSrcMsg(const Symbol &sym, uint64_t offset) { in getSrcMsg() argument
324 return file->getSrcMsg(sym, *this, offset); in getSrcMsg()
416 Symbol &sym = file->getRelocTargetSym(rel); in copyRelocations() local
427 p->setSymbolAndType(in.symTab->getSymbolIndex(&sym), type, in copyRelocations()
430 if (sym.type == STT_SECTION) { in copyRelocations()
443 auto *d = dyn_cast<Defined>(&sym); in copyRelocations()
448 uint32_t secIdx = cast<Undefined>(sym).discardedSecIdx; in copyRelocations()
470 target->getRelExpr(type, sym, bufLoc) == R_MIPS_GOTREL) { in copyRelocations()
486 p->r_addend = sym.getVA(addend) - section->getOutputSection()->addr; in copyRelocations()
488 sec->relocations.push_back({R_ABS, type, rel.r_offset, addend, &sym}); in copyRelocations()
585 static uint64_t getARMStaticBase(const Symbol &sym) { in getARMStaticBase() argument
586 OutputSection *os = sym.getOutputSection(); in getARMStaticBase()
588 fatal("SBREL relocation to " + sym.getName() + " without static base"); in getARMStaticBase()
598 static Relocation *getRISCVPCRelHi20(const Symbol *sym, uint64_t addend) { in getRISCVPCRelHi20() argument
599 const Defined *d = cast<Defined>(sym); in getRISCVPCRelHi20()
602 sym->getName()); in getRISCVPCRelHi20()
680 const Symbol &sym, RelExpr expr) { in getRelocTargetVA() argument
687 return sym.getVA(a); in getRelocTargetVA()
691 return sym.getVA(a) - getARMStaticBase(sym); in getRelocTargetVA()
694 return sym.getGotVA() + a; in getRelocTargetVA()
701 return sym.getVA(a) - in.got->getVA(); in getRelocTargetVA()
703 return sym.getVA(a) - in.gotPlt->getVA(); in getRelocTargetVA()
706 return sym.getGotVA() + a - in.gotPlt->getVA(); in getRelocTargetVA()
710 return sym.getGotOffset() + a; in getRelocTargetVA()
713 return getAArch64Page(sym.getGotVA() + a) - getAArch64Page(p); in getRelocTargetVA()
715 return sym.getGotVA() + a - getAArch64Page(in.got->getVA()); in getRelocTargetVA()
718 return sym.getGotVA() + a - p; in getRelocTargetVA()
720 return sym.getVA(a) - in.mipsGot->getGp(file); in getRelocTargetVA()
742 return in.mipsGot->getVA() + in.mipsGot->getPageEntryOffset(file, sym, a) - in getRelocTargetVA()
749 return in.mipsGot->getVA() + in.mipsGot->getSymEntryOffset(file, sym, a) - in getRelocTargetVA()
752 return in.mipsGot->getVA() + in.mipsGot->getGlobalDynOffset(file, sym) - in getRelocTargetVA()
758 uint64_t val = sym.isUndefWeak() ? p + a : sym.getVA(a); in getRelocTargetVA()
762 if (const Relocation *hiRel = getRISCVPCRelHi20(&sym, a)) in getRelocTargetVA()
763 return getRelocTargetVA(file, hiRel->type, hiRel->addend, sym.getVA(), in getRelocTargetVA()
764 *hiRel->sym, hiRel->expr); in getRelocTargetVA()
773 if (sym.isUndefWeak()) { in getRelocTargetVA()
787 dest = sym.getVA(a); in getRelocTargetVA()
789 dest = sym.getVA(a); in getRelocTargetVA()
794 return sym.getPltVA() + a; in getRelocTargetVA()
797 return sym.getPltVA() + a - p; in getRelocTargetVA()
802 return sym.getPltVA() - p; in getRelocTargetVA()
804 uint64_t symVA = sym.getVA(a); in getRelocTargetVA()
817 return symVA - p + getPPC64GlobalEntryToLocalEntryOffset(sym.stOther); in getRelocTargetVA()
823 return sym.getVA(a) - p; in getRelocTargetVA()
832 if (sym.isUndefined() || sym.isLazy()) in getRelocTargetVA()
834 return getTlsTpOffset(sym) + a; in getRelocTargetVA()
837 if (sym.isUndefined()) in getRelocTargetVA()
839 return -getTlsTpOffset(sym) + a; in getRelocTargetVA()
841 return sym.getSize() + a; in getRelocTargetVA()
843 return in.got->getGlobalDynAddr(sym) + a; in getRelocTargetVA()
845 return in.got->getGlobalDynAddr(sym) + a - p; in getRelocTargetVA()
847 return getAArch64Page(in.got->getGlobalDynAddr(sym) + a) - in getRelocTargetVA()
850 return in.got->getGlobalDynOffset(sym) + a; in getRelocTargetVA()
852 return in.got->getGlobalDynAddr(sym) + a - in.gotPlt->getVA(); in getRelocTargetVA()
854 return in.got->getGlobalDynAddr(sym) + a - p; in getRelocTargetVA()
903 Symbol &sym = getFile<ELFT>()->getRelocTargetSym(rel); in relocateNonAlloc() local
904 RelExpr expr = target->getRelExpr(type, sym, bufLoc); in relocateNonAlloc()
910 SignExtend64<bits>(sym.getSize() + addend)); in relocateNonAlloc()
920 " against symbol '" + toString(sym) + "'"; in relocateNonAlloc()
936 SignExtend64<bits>(sym.getVA(addend - offset - outSecOff))); in relocateNonAlloc()
970 auto *ds = dyn_cast<Defined>(&sym); in relocateNonAlloc()
971 if (!sym.getOutputSection() || in relocateNonAlloc()
980 target->relocateNoSym(bufLoc, type, SignExtend64<bits>(sym.getVA(addend))); in relocateNonAlloc()
996 uint64_t targetVA = SignExtend64(rel.sym->getVA(rel.addend), bits); in relocateNonAllocForRelocatable()
1037 getRelocTargetVA(file, type, rel.addend, addrLoc, *rel.sym, expr), in relocateAlloc()
1065 if (ppc64noTocRelax.count({rel.sym, rel.addend}) || in relocateAlloc()
1095 if (rel.sym->needsTocRestore) { in relocateAlloc()
1101 rel.sym->file != file) { in relocateAlloc()
1104 lld::toString(*rel.sym).substr(6) + in relocateAlloc()
1162 (*it)->sym = moreStackNonSplit; in switchMorestackCallsToMorestackNonSplit()
1191 if (rel.sym->isLocal()) in adjustSplitStackFunctionPrologues()
1195 if (rel.sym->getName().startswith("__morestack")) { in adjustSplitStackFunctionPrologues()
1196 if (rel.sym->getName().equals("__morestack")) in adjustSplitStackFunctionPrologues()
1204 if (rel.sym->type != STT_FUNC) in adjustSplitStackFunctionPrologues()
1212 if (Defined *d = dyn_cast<Defined>(rel.sym)) in adjustSplitStackFunctionPrologues()
1227 " (with -fsplit-stack) calls " + rel.sym->getName() + in adjustSplitStackFunctionPrologues()