Lines Matching refs:rel

98 void elf::reportRangeError(uint8_t *loc, const Relocation &rel, const Twine &v,  in reportRangeError()  argument
102 if (rel.sym && !rel.sym->isSection()) in reportRangeError()
103 hint = "; references " + lld::toString(*rel.sym); in reportRangeError()
106 if (rel.sym && !rel.sym->isSection()) in reportRangeError()
107 hint += getDefinedLocation(*rel.sym); in reportRangeError()
113 errorOrWarn(errPlace.loc + "relocation " + lld::toString(rel.type) + in reportRangeError()
448 template <class RelTy> RelType getMipsN32RelType(RelTy *&rel) const;
450 int64_t computeMipsAddend(const RelTy &rel, RelExpr expr, bool isLocal) const;
452 int64_t computeAddend(const RelTy &rel, RelExpr expr, bool isLocal) const;
466 int64_t RelocationScanner::computeMipsAddend(const RelTy &rel, RelExpr expr, in computeMipsAddend() argument
476 RelType type = rel.getType(config->isMips64EL); in computeMipsAddend()
482 uint32_t symIndex = rel.getSymbol(config->isMips64EL); in computeMipsAddend()
486 for (const RelTy *ri = &rel; ri != static_cast<const RelTy *>(end); ++ri) in computeMipsAddend()
500 int64_t RelocationScanner::computeAddend(const RelTy &rel, RelExpr expr, in computeAddend() argument
503 RelType type = rel.getType(config->isMips64EL); in computeAddend()
506 addend = getAddend<ELFT>(rel); in computeAddend()
509 addend = target.getImplicitAddend(buf + rel.r_offset, type); in computeAddend()
515 addend += computeMipsAddend<ELFT>(rel, expr, isLocal); in computeAddend()
856 RelType RelocationScanner::getMipsN32RelType(RelTy *&rel) const { in getMipsN32RelType()
858 uint64_t offset = rel->r_offset; in getMipsN32RelType()
861 while (rel != static_cast<const RelTy *>(end) && rel->r_offset == offset) in getMipsN32RelType()
862 type |= (rel++)->getType(config->isMips64EL) << (8 * n++); in getMipsN32RelType()
888 RelocationBaseSection &rel, RelType type, Symbol &sym) { in addPltEntry() argument
891 rel.addReloc({type, &gotPlt, sym.getGotPltOffset(), in addPltEntry()
1050 RelType rel = target.getDynRel(type); in processAux() local
1051 if (expr == R_GOT || (rel == target.symbolicRel && !sym.isPreemptible)) { in processAux()
1054 } else if (rel != 0) { in processAux()
1055 if (config->emachine == EM_MIPS && rel == target.symbolicRel) in processAux()
1056 rel = target.relativeRel; in processAux()
1057 sec.getPartition().relaDyn->addSymbolReloc(rel, sec, offset, sym, addend, in processAux()
1295 const RelTy &rel = *i; in scanOne() local
1296 uint32_t symIndex = rel.getSymbol(config->isMips64EL); in scanOne()
1304 type = rel.getType(config->isMips64EL); in scanOne()
1309 uint64_t offset = getter.get(rel.r_offset); in scanOne()
1327 int64_t addend = computeAddend<ELFT>(rel, expr, sym.isLocal()); in scanOne()
1457 for (const RelTy &rel : rels) { in checkPPC64TLSRelax() local
1458 RelType type = rel.getType(false); in checkPPC64TLSRelax()
1887 const Relocation &rel, in getISDThunkSec() argument
1890 const int64_t pcBias = getPCBias(rel.type); in getISDThunkSec()
1895 if (target->inBranchRange(rel.type, src, in getISDThunkSec()
1906 if (!target->inBranchRange(rel.type, src, in getISDThunkSec()
1907 os->addr + thunkSecOff + rel.addend)) { in getISDThunkSec()
1909 if (!target->inBranchRange(rel.type, src, in getISDThunkSec()
1910 os->addr + thunkSecOff + rel.addend)) in getISDThunkSec()
2046 Relocation &rel, uint64_t src) { in getThunk() argument
2052 const int64_t pcBias = getPCBias(rel.type); in getThunk()
2053 const int64_t keyAddend = rel.addend + pcBias; in getThunk()
2060 if (auto *d = dyn_cast<Defined>(rel.sym)) in getThunk()
2065 thunkVec = &thunkedSymbols[{rel.sym, keyAddend}]; in getThunk()
2070 t->isCompatibleWith(*isec, rel) && in getThunk()
2071 target->inBranchRange(rel.type, src, in getThunk()
2076 Thunk *t = addThunk(*isec, rel); in getThunk()
2085 bool ThunkCreator::normalizeExistingThunk(Relocation &rel, uint64_t src) { in normalizeExistingThunk() argument
2086 if (Thunk *t = thunks.lookup(rel.sym)) { in normalizeExistingThunk()
2087 if (target->inBranchRange(rel.type, src, rel.sym->getVA(rel.addend))) in normalizeExistingThunk()
2089 rel.sym = &t->destination; in normalizeExistingThunk()
2090 rel.addend = t->addend; in normalizeExistingThunk()
2091 if (rel.sym->isInPlt()) in normalizeExistingThunk()
2092 rel.expr = toPlt(rel.expr); in normalizeExistingThunk()
2138 for (Relocation &rel : isec->relocations) { in createThunks()
2139 uint64_t src = isec->getVA(rel.offset); in createThunks()
2144 if (pass > 0 && normalizeExistingThunk(rel, src)) in createThunks()
2147 if (!target->needsThunk(rel.expr, rel.type, isec->file, src, in createThunks()
2148 *rel.sym, rel.addend)) in createThunks()
2153 std::tie(t, isNew) = getThunk(isec, rel, src); in createThunks()
2161 ts = getISDThunkSec(os, isec, isd, rel, src); in createThunks()
2167 rel.sym = t->getThunkTargetSym(); in createThunks()
2168 rel.expr = fromPlt(rel.expr); in createThunks()
2174 rel.addend = -getPCBias(rel.type); in createThunks()
2198 for (Relocation &rel : isec->relocations) in hexagonNeedsTLSSymbol()
2199 if (rel.sym->type == llvm::ELF::STT_TLS && rel.expr == R_PLT_PC) { in hexagonNeedsTLSSymbol()
2215 for (Relocation &rel : isec->relocations) in hexagonTLSSymbolUpdate()
2216 if (rel.sym->type == llvm::ELF::STT_TLS && rel.expr == R_PLT_PC) { in hexagonTLSSymbolUpdate()
2223 rel.sym = sym; in hexagonTLSSymbolUpdate()