Lines Matching refs:Sym
324 std::string InputSectionBase::getSrcMsg(const Symbol &Sym, uint64_t Offset) { in getSrcMsg() argument
325 return File->getSrcMsg(Sym, *this, Offset); in getSrcMsg()
411 Symbol &Sym = getFile<ELFT>()->getRelocTargetSym(Rel); in copyRelocations() local
422 P->setSymbolAndType(In.SymTab->getSymbolIndex(&Sym), Type, in copyRelocations()
425 if (Sym.Type == STT_SECTION) { in copyRelocations()
435 auto *D = dyn_cast<Defined>(&Sym); in copyRelocations()
452 Target->getRelExpr(Type, Sym, BufLoc) == R_MIPS_GOTREL) { in copyRelocations()
468 P->r_addend = Sym.getVA(Addend) - Section->getOutputSection()->Addr; in copyRelocations()
470 Sec->Relocations.push_back({R_ABS, Type, Rel.r_offset, Addend, &Sym}); in copyRelocations()
540 static uint64_t getARMStaticBase(const Symbol &Sym) { in getARMStaticBase() argument
541 OutputSection *OS = Sym.getOutputSection(); in getARMStaticBase()
543 fatal("SBREL relocation to " + Sym.getName() + " without static base"); in getARMStaticBase()
553 static Relocation *getRISCVPCRelHi20(const Symbol *Sym, uint64_t Addend) { in getRISCVPCRelHi20() argument
554 const Defined *D = cast<Defined>(Sym); in getRISCVPCRelHi20()
600 uint64_t P, const Symbol &Sym, RelExpr Expr) { in getRelocTargetVA() argument
607 return Sym.getVA(A); in getRelocTargetVA()
611 return Sym.getVA(A) - getARMStaticBase(Sym); in getRelocTargetVA()
615 return Sym.getGotVA() + A; in getRelocTargetVA()
621 return Sym.getVA(A) - In.Got->getVA(); in getRelocTargetVA()
623 return Sym.getVA(A) - In.Got->getVA() - In.Got->getSize(); in getRelocTargetVA()
626 return Sym.getGotOffset() + A - In.Got->getSize(); in getRelocTargetVA()
630 return Sym.getGotOffset() + A; in getRelocTargetVA()
634 return getAArch64Page(Sym.getGotVA() + A) - getAArch64Page(P); in getRelocTargetVA()
637 return Sym.getGotVA() + A - P; in getRelocTargetVA()
639 return Sym.getGotVA() - In.GotPlt->getVA(); in getRelocTargetVA()
641 return Sym.getVA(A) - In.MipsGot->getGp(File); in getRelocTargetVA()
663 return In.MipsGot->getVA() + In.MipsGot->getPageEntryOffset(File, Sym, A) - in getRelocTargetVA()
670 return In.MipsGot->getVA() + In.MipsGot->getSymEntryOffset(File, Sym, A) - in getRelocTargetVA()
673 return In.MipsGot->getVA() + In.MipsGot->getGlobalDynOffset(File, Sym) - in getRelocTargetVA()
679 uint64_t Val = Sym.isUndefWeak() ? P + A : Sym.getVA(A); in getRelocTargetVA()
683 uint64_t Val = Sym.isUndefWeak() ? P + A : Sym.getPltVA() + A; in getRelocTargetVA()
687 if (const Relocation *HiRel = getRISCVPCRelHi20(&Sym, A)) in getRelocTargetVA()
688 return getRelocTargetVA(File, HiRel->Type, HiRel->Addend, Sym.getVA(), in getRelocTargetVA()
689 *HiRel->Sym, HiRel->Expr); in getRelocTargetVA()
694 if (Sym.isUndefWeak()) { in getRelocTargetVA()
702 Dest = Sym.getVA(A); in getRelocTargetVA()
704 Dest = Sym.getVA(A); in getRelocTargetVA()
709 return Sym.getPltVA() + A; in getRelocTargetVA()
712 return Sym.getPltVA() + A - P; in getRelocTargetVA()
714 uint64_t SymVA = Sym.getVA(A); in getRelocTargetVA()
727 return SymVA - P + getPPC64GlobalEntryToLocalEntryOffset(Sym.StOther); in getRelocTargetVA()
732 return Sym.getVA(A) - P; in getRelocTargetVA()
742 if (Sym.isTls() && Sym.isUndefWeak()) in getRelocTargetVA()
744 return Sym.getVA(A) + getTlsTpOffset(); in getRelocTargetVA()
747 return Out::TlsPhdr->p_memsz - Sym.getVA(A); in getRelocTargetVA()
749 return Sym.getSize() + A; in getRelocTargetVA()
751 return In.Got->getGlobalDynAddr(Sym) + A; in getRelocTargetVA()
753 return getAArch64Page(In.Got->getGlobalDynAddr(Sym) + A) - in getRelocTargetVA()
756 return In.Got->getGlobalDynOffset(Sym) + A; in getRelocTargetVA()
758 return In.Got->getGlobalDynOffset(Sym) + A - In.Got->getSize(); in getRelocTargetVA()
760 return In.Got->getGlobalDynAddr(Sym) + A - P; in getRelocTargetVA()
799 Symbol &Sym = getFile<ELFT>()->getRelocTargetSym(Rel); in relocateNonAlloc() local
800 RelExpr Expr = Target->getRelExpr(Type, Sym, BufLoc); in relocateNonAlloc()
807 " against symbol '" + toString(Sym) + "'"; in relocateNonAlloc()
822 SignExtend64<Bits>(Sym.getVA(Addend - Offset))); in relocateNonAlloc()
826 if (Sym.isTls() && !Out::TlsPhdr) in relocateNonAlloc()
829 Target->relocateOne(BufLoc, Type, SignExtend64<Bits>(Sym.getVA(Addend))); in relocateNonAlloc()
845 uint64_t TargetVA = SignExtend64(Rel.Sym->getVA(Rel.Addend), Bits); in relocateNonAllocForRelocatable()
883 getRelocTargetVA(File, Type, Rel.Addend, AddrLoc, *Rel.Sym, Expr), in relocateAlloc()
917 if (Rel.Sym->NeedsTocRestore) { in relocateAlloc()
964 (*It)->Sym = MoreStackNonSplit; in switchMorestackCallsToMorestackNonSplit()
993 if (Rel.Sym->isLocal()) in adjustSplitStackFunctionPrologues()
997 if (Rel.Sym->getName().startswith("__morestack")) { in adjustSplitStackFunctionPrologues()
998 if (Rel.Sym->getName().equals("__morestack")) in adjustSplitStackFunctionPrologues()
1006 if (Rel.Sym->Type != STT_FUNC) in adjustSplitStackFunctionPrologues()
1014 if (Defined *D = dyn_cast<Defined>(Rel.Sym)) in adjustSplitStackFunctionPrologues()
1029 " (with -fsplit-stack) calls " + Rel.Sym->getName() + in adjustSplitStackFunctionPrologues()