Lines Matching refs:Sec
507 static void replaceWithDefined(Symbol &Sym, SectionBase *Sec, uint64_t Value, in replaceWithDefined() argument
511 Sym.StOther, Sym.Type, Value, Size, Sec); in replaceWithDefined()
573 BssSection *Sec = make<BssSection>(IsReadOnly ? ".bss.rel.ro" : ".bss", in addCopyRelSymbol() local
576 In.BssRelRo->getParent()->addSection(Sec); in addCopyRelSymbol()
578 In.Bss->getParent()->addSection(Sec); in addCopyRelSymbol()
584 replaceWithDefined(*Sym, Sec, 0, Sym->Size); in addCopyRelSymbol()
586 In.RelaDyn->addReloc(Target->CopyRel, Sec, 0, &SS); in addCopyRelSymbol()
595 InputSectionBase &Sec, RelExpr Expr, in computeMipsAddend() argument
598 return Sec.getFile<ELFT>()->MipsGp0; in computeMipsAddend()
610 const uint8_t *Buf = Sec.data().data(); in computeMipsAddend()
630 InputSectionBase &Sec, RelExpr Expr, in computeAddend() argument
638 const uint8_t *Buf = Sec.data().data(); in computeAddend()
645 Addend += computeMipsAddend<ELFT>(Rel, End, Sec, Expr, IsLocal); in computeAddend()
652 static bool maybeReportUndefined(Symbol &Sym, InputSectionBase &Sec, in maybeReportUndefined() argument
665 std::string Src = Sec.getSrcMsg(Sym, Offset); in maybeReportUndefined()
668 Msg += Sec.getObjMsg(Offset); in maybeReportUndefined()
713 explicit OffsetGetter(InputSectionBase &Sec) { in OffsetGetter() argument
714 if (auto *Eh = dyn_cast<EhInputSection>(&Sec)) in OffsetGetter()
844 static void processRelocAux(InputSectionBase &Sec, RelExpr Expr, RelType Type, in processRelocAux() argument
847 if (isStaticLinkTimeConstant(Expr, Type, Sym, Sec, Offset)) { in processRelocAux()
848 Sec.Relocations.push_back({Expr, Type, Offset, Addend, &Sym}); in processRelocAux()
852 In.RelaDyn->addReloc(Type, &Sec, Offset, &Sym, Addend, R_ADDEND, Type); in processRelocAux()
855 bool CanWrite = (Sec.Flags & SHF_WRITE) || !Config->ZText; in processRelocAux()
861 addRelativeReloc(&Sec, Offset, &Sym, Addend, Expr, Type); in processRelocAux()
864 In.RelaDyn->addReloc(Rel, &Sec, Offset, &Sym, Addend, R_ADDEND, Type); in processRelocAux()
882 In.MipsGot->addEntry(*Sec.File, Sym, Addend, Expr); in processRelocAux()
890 Sec.Relocations.push_back({Expr, Type, Offset, Addend, &Sym}); in processRelocAux()
900 getLocation(Sec, Sym, Offset)); in processRelocAux()
908 "; recompile with -fPIC" + getLocation(Sec, Sym, Offset)); in processRelocAux()
918 getLocation(Sec, Sym, Offset)); in processRelocAux()
929 getLocation(Sec, Sym, Offset)); in processRelocAux()
932 Sec.Relocations.push_back({Expr, Type, Offset, Addend, &Sym}); in processRelocAux()
967 getLocation(Sec, Sym, Offset)); in processRelocAux()
973 Sec.Relocations.push_back({Expr, Type, Offset, Addend, &Sym}); in processRelocAux()
978 getLocation(Sec, Sym, Offset)); in processRelocAux()
982 static void scanReloc(InputSectionBase &Sec, OffsetGetter &GetOffset, RelTy *&I, in scanReloc() argument
985 Symbol &Sym = Sec.getFile<ELFT>()->getRelocTargetSym(Rel); in scanReloc()
1002 if (maybeReportUndefined(Sym, Sec, Rel.r_offset)) in scanReloc()
1005 const uint8_t *RelocatedAddr = Sec.data().begin() + Rel.r_offset; in scanReloc()
1031 getLocation(Sec, Sym, Offset)); in scanReloc()
1047 int64_t Addend = computeAddend<ELFT>(Rel, End, Sec, Expr, Sym.isLocal()); in scanReloc()
1052 handleTlsRelocation<ELFT>(Type, Sym, Sec, Offset, Addend, Expr)) { in scanReloc()
1076 In.MipsGot->addEntry(*Sec.File, Sym, Addend, Expr); in scanReloc()
1082 processRelocAux<ELFT>(Sec, Expr, Type, Offset, Sym, Rel, Addend); in scanReloc()
1086 static void scanRelocs(InputSectionBase &Sec, ArrayRef<RelTy> Rels) { in scanRelocs() argument
1087 OffsetGetter GetOffset(Sec); in scanRelocs()
1090 Sec.Relocations.reserve(Rels.size()); in scanRelocs()
1093 scanReloc<ELFT>(Sec, GetOffset, I, End); in scanRelocs()
1097 std::stable_sort(Sec.Relocations.begin(), Sec.Relocations.end(), in scanRelocs()