Lines Matching refs:rel

99 void elf::reportRangeError(uint8_t *loc, const Relocation &rel, const Twine &v,  in reportRangeError()  argument
103 if (rel.sym) { in reportRangeError()
104 if (!rel.sym->isSection()) in reportRangeError()
105 hint = "; references '" + lld::toString(*rel.sym) + '\''; in reportRangeError()
106 else if (auto *d = dyn_cast<Defined>(rel.sym)) in reportRangeError()
109 if (config->emachine == EM_X86_64 && rel.type == R_X86_64_PC32 && in reportRangeError()
110 rel.sym->getOutputSection() && in reportRangeError()
111 (rel.sym->getOutputSection()->flags & SHF_X86_64_LARGE)) { in reportRangeError()
118 if (rel.sym && !rel.sym->isSection()) in reportRangeError()
119 hint += getDefinedLocation(*rel.sym); in reportRangeError()
125 errorOrWarn(errPlace.loc + "relocation " + lld::toString(rel.type) + in reportRangeError()
471 template <class RelTy> RelType getMipsN32RelType(RelTy *&rel) const;
473 int64_t computeMipsAddend(const RelTy &rel, RelExpr expr, bool isLocal) const;
488 int64_t RelocationScanner::computeMipsAddend(const RelTy &rel, RelExpr expr, in computeMipsAddend() argument
498 RelType type = rel.getType(config->isMips64EL); in computeMipsAddend()
504 uint32_t symIndex = rel.getSymbol(config->isMips64EL); in computeMipsAddend()
508 for (const RelTy *ri = &rel; ri != static_cast<const RelTy *>(end); ++ri) in computeMipsAddend()
858 RelType RelocationScanner::getMipsN32RelType(RelTy *&rel) const { in getMipsN32RelType()
860 uint64_t offset = rel->r_offset; in getMipsN32RelType()
863 while (rel != static_cast<const RelTy *>(end) && rel->r_offset == offset) in getMipsN32RelType()
864 type |= (rel++)->getType(config->isMips64EL) << (8 * n++); in getMipsN32RelType()
912 RelocationBaseSection &rel, RelType type, Symbol &sym) { in addPltEntry() argument
915 rel.addReloc({type, &gotPlt, sym.getGotPltOffset(), in addPltEntry()
1139 RelType rel = target->getDynRel(type); in processAux() local
1141 (rel == target->symbolicRel && !sym.isPreemptible)) { in processAux()
1144 } else if (rel != 0) { in processAux()
1145 if (config->emachine == EM_MIPS && rel == target->symbolicRel) in processAux()
1146 rel = target->relativeRel; in processAux()
1148 sec->getPartition().relaDyn->addSymbolReloc(rel, *sec, offset, sym, in processAux()
1400 const RelTy &rel = *i; in scanOne() local
1401 uint32_t symIndex = rel.getSymbol(config->isMips64EL); in scanOne()
1407 type = rel.getType(config->isMips64EL); in scanOne()
1411 uint64_t offset = getter.get(rel.r_offset); in scanOne()
1417 ? getAddend<ELFT>(rel) in scanOne()
1419 sec->content().data() + rel.r_offset, type); in scanOne()
1421 addend += computeMipsAddend<ELFT>(rel, expr, sym.isLocal()); in scanOne()
1508 for (const RelTy &rel : rels) { in checkPPC64TLSRelax() local
1509 RelType type = rel.getType(false); in checkPPC64TLSRelax()
1998 const Relocation &rel, in getISDThunkSec() argument
2001 const int64_t pcBias = getPCBias(rel.type); in getISDThunkSec()
2006 if (target->inBranchRange(rel.type, src, in getISDThunkSec()
2017 if (!target->inBranchRange(rel.type, src, in getISDThunkSec()
2018 os->addr + thunkSecOff + rel.addend)) { in getISDThunkSec()
2020 if (!target->inBranchRange(rel.type, src, in getISDThunkSec()
2021 os->addr + thunkSecOff + rel.addend)) in getISDThunkSec()
2157 Relocation &rel, uint64_t src) { in getThunk() argument
2163 const int64_t pcBias = getPCBias(rel.type); in getThunk()
2164 const int64_t keyAddend = rel.addend + pcBias; in getThunk()
2171 if (auto *d = dyn_cast<Defined>(rel.sym)) in getThunk()
2176 thunkVec = &thunkedSymbols[{rel.sym, keyAddend}]; in getThunk()
2181 t->isCompatibleWith(*isec, rel) && in getThunk()
2182 target->inBranchRange(rel.type, src, in getThunk()
2187 Thunk *t = addThunk(*isec, rel); in getThunk()
2196 bool ThunkCreator::normalizeExistingThunk(Relocation &rel, uint64_t src) { in normalizeExistingThunk() argument
2197 if (Thunk *t = thunks.lookup(rel.sym)) { in normalizeExistingThunk()
2198 if (target->inBranchRange(rel.type, src, rel.sym->getVA(rel.addend))) in normalizeExistingThunk()
2200 rel.sym = &t->destination; in normalizeExistingThunk()
2201 rel.addend = t->addend; in normalizeExistingThunk()
2202 if (rel.sym->isInPlt()) in normalizeExistingThunk()
2203 rel.expr = toPlt(rel.expr); in normalizeExistingThunk()
2249 for (Relocation &rel : isec->relocs()) { in createThunks()
2250 uint64_t src = isec->getVA(rel.offset); in createThunks()
2255 if (pass > 0 && normalizeExistingThunk(rel, src)) in createThunks()
2258 if (!target->needsThunk(rel.expr, rel.type, isec->file, src, in createThunks()
2259 *rel.sym, rel.addend)) in createThunks()
2264 std::tie(t, isNew) = getThunk(isec, rel, src); in createThunks()
2272 ts = getISDThunkSec(os, isec, isd, rel, src); in createThunks()
2278 rel.sym = t->getThunkTargetSym(); in createThunks()
2279 rel.expr = fromPlt(rel.expr); in createThunks()
2285 rel.addend = -getPCBias(rel.type); in createThunks()
2309 for (Relocation &rel : isec->relocs()) in hexagonNeedsTLSSymbol()
2310 if (rel.sym->type == llvm::ELF::STT_TLS && rel.expr == R_PLT_PC) { in hexagonNeedsTLSSymbol()
2326 for (Relocation &rel : isec->relocs()) in hexagonTLSSymbolUpdate()
2327 if (rel.sym->type == llvm::ELF::STT_TLS && rel.expr == R_PLT_PC) { in hexagonTLSSymbolUpdate()
2334 rel.sym = sym; in hexagonTLSSymbolUpdate()