Lines Matching refs:rel

99 void elf::reportRangeError(uint8_t *loc, const Relocation &rel, const Twine &v,  in reportRangeError()  argument
103 if (rel.sym && !rel.sym->isLocal()) in reportRangeError()
104 hint = "; references " + lld::toString(*rel.sym) + in reportRangeError()
105 getDefinedLocation(*rel.sym); in reportRangeError()
111 errorOrWarn(errPlace.loc + "relocation " + lld::toString(rel.type) + in reportRangeError()
637 static int64_t computeMipsAddend(const RelTy &rel, const RelTy *end, in computeMipsAddend() argument
648 RelType type = rel.getType(config->isMips64EL); in computeMipsAddend()
654 uint32_t symIndex = rel.getSymbol(config->isMips64EL); in computeMipsAddend()
658 for (const RelTy *ri = &rel; ri != end; ++ri) in computeMipsAddend()
672 static int64_t computeAddend(const RelTy &rel, const RelTy *end, in computeAddend() argument
676 RelType type = rel.getType(config->isMips64EL); in computeAddend()
679 addend = getAddend<ELFT>(rel); in computeAddend()
682 addend = target->getImplicitAddend(buf + rel.r_offset, type); in computeAddend()
688 addend += computeMipsAddend<ELFT>(rel, end, sec, expr, isLocal); in computeAddend()
1001 template <class RelTy> static RelType getMipsN32RelType(RelTy *&rel, RelTy *end) { in getMipsN32RelType() argument
1003 uint64_t offset = rel->r_offset; in getMipsN32RelType()
1006 while (rel != end && rel->r_offset == offset) in getMipsN32RelType()
1007 type |= (rel++)->getType(config->isMips64EL) << (8 * n++); in getMipsN32RelType()
1079 RelocationBaseSection *rel, RelType type, Symbol &sym) { in addPltEntry() argument
1082 rel->addReloc({type, gotPlt, sym.getGotPltOffset(), in addPltEntry()
1154 uint64_t offset, Symbol &sym, const RelTy &rel, in processRelocAux() argument
1178 RelType rel = target->getDynRel(type); in processRelocAux() local
1179 if (expr == R_GOT || (rel == target->symbolicRel && !sym.isPreemptible)) { in processRelocAux()
1182 } else if (rel != 0) { in processRelocAux()
1183 if (config->emachine == EM_MIPS && rel == target->symbolicRel) in processRelocAux()
1184 rel = target->relativeRel; in processRelocAux()
1185 sec.getPartition().relaDyn->addSymbolReloc(rel, &sec, offset, sym, addend, in processRelocAux()
1307 const RelTy &rel = *i; in scanReloc() local
1308 uint32_t symIndex = rel.getSymbol(config->isMips64EL); in scanReloc()
1316 type = rel.getType(config->isMips64EL); in scanReloc()
1321 uint64_t offset = getOffset.get(rel.r_offset); in scanReloc()
1327 if (symIndex != 0 && maybeReportUndefined(sym, sec, rel.r_offset)) in scanReloc()
1330 const uint8_t *relocatedAddr = sec.data().begin() + rel.r_offset; in scanReloc()
1338 int64_t addend = computeAddend<ELFT>(rel, end, sec, expr, sym.isLocal()); in scanReloc()
1546 processRelocAux<ELFT>(sec, expr, type, offset, sym, rel, addend); in scanReloc()
1560 for (const RelTy &rel : rels) { in checkPPC64TLSRelax() local
1561 RelType type = rel.getType(false); in checkPPC64TLSRelax()
1793 const Relocation &rel, in getISDThunkSec() argument
1797 uint64_t tsBase = os->addr + ts->outSecOff + rel.addend; in getISDThunkSec()
1798 uint64_t tsLimit = tsBase + ts->getSize() + rel.addend; in getISDThunkSec()
1799 if (target->inBranchRange(rel.type, src, in getISDThunkSec()
1810 if (!target->inBranchRange(rel.type, src, in getISDThunkSec()
1811 os->addr + thunkSecOff + rel.addend)) { in getISDThunkSec()
1813 if (!target->inBranchRange(rel.type, src, in getISDThunkSec()
1814 os->addr + thunkSecOff + rel.addend)) in getISDThunkSec()
1963 Relocation &rel, uint64_t src) { in getThunk() argument
1969 const int64_t pcBias = getPCBias(rel.type); in getThunk()
1970 const int64_t keyAddend = rel.addend + pcBias; in getThunk()
1977 if (auto *d = dyn_cast<Defined>(rel.sym)) in getThunk()
1982 thunkVec = &thunkedSymbols[{rel.sym, keyAddend}]; in getThunk()
1987 t->isCompatibleWith(*isec, rel) && in getThunk()
1988 target->inBranchRange(rel.type, src, in getThunk()
1993 Thunk *t = addThunk(*isec, rel); in getThunk()
2002 bool ThunkCreator::normalizeExistingThunk(Relocation &rel, uint64_t src) { in normalizeExistingThunk() argument
2003 if (Thunk *t = thunks.lookup(rel.sym)) { in normalizeExistingThunk()
2004 if (target->inBranchRange(rel.type, src, rel.sym->getVA(rel.addend))) in normalizeExistingThunk()
2006 rel.sym = &t->destination; in normalizeExistingThunk()
2007 rel.addend = t->addend; in normalizeExistingThunk()
2008 if (rel.sym->isInPlt()) in normalizeExistingThunk()
2009 rel.expr = toPlt(rel.expr); in normalizeExistingThunk()
2053 for (Relocation &rel : isec->relocations) { in createThunks()
2054 uint64_t src = isec->getVA(rel.offset); in createThunks()
2059 if (pass > 0 && normalizeExistingThunk(rel, src)) in createThunks()
2062 if (!target->needsThunk(rel.expr, rel.type, isec->file, src, in createThunks()
2063 *rel.sym, rel.addend)) in createThunks()
2068 std::tie(t, isNew) = getThunk(isec, rel, src); in createThunks()
2076 ts = getISDThunkSec(os, isec, isd, rel, src); in createThunks()
2082 rel.sym = t->getThunkTargetSym(); in createThunks()
2083 rel.expr = fromPlt(rel.expr); in createThunks()
2089 rel.addend = -getPCBias(rel.type); in createThunks()
2114 for (Relocation &rel : isec->relocations) in hexagonNeedsTLSSymbol()
2115 if (rel.sym->type == llvm::ELF::STT_TLS && rel.expr == R_PLT_PC) { in hexagonNeedsTLSSymbol()
2131 for (Relocation &rel : isec->relocations) in hexagonTLSSymbolUpdate()
2132 if (rel.sym->type == llvm::ELF::STT_TLS && rel.expr == R_PLT_PC) { in hexagonTLSSymbolUpdate()
2138 rel.sym = sym; in hexagonTLSSymbolUpdate()