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()
472 template <class RelTy> RelType getMipsN32RelType(RelTy *&rel) const;
474 int64_t computeMipsAddend(const RelTy &rel, RelExpr expr, bool isLocal) const;
490 int64_t RelocationScanner::computeMipsAddend(const RelTy &rel, RelExpr expr, in computeMipsAddend() argument
501 RelType type = rel.getType(config->isMips64EL); in computeMipsAddend()
507 uint32_t symIndex = rel.getSymbol(config->isMips64EL); in computeMipsAddend()
511 for (const RelTy *ri = &rel; ri != static_cast<const RelTy *>(end); ++ri) in computeMipsAddend()
861 RelType RelocationScanner::getMipsN32RelType(RelTy *&rel) const { in getMipsN32RelType()
863 uint64_t offset = rel->r_offset; in getMipsN32RelType()
866 while (rel != static_cast<const RelTy *>(end) && rel->r_offset == offset) in getMipsN32RelType()
867 type |= (rel++)->getType(config->isMips64EL) << (8 * n++); in getMipsN32RelType()
915 RelocationBaseSection &rel, RelType type, Symbol &sym) { in addPltEntry() argument
918 rel.addReloc({type, &gotPlt, sym.getGotPltOffset(), in addPltEntry()
1143 RelType rel = target->getDynRel(type); in processAux() local
1145 (rel == target->symbolicRel && !sym.isPreemptible)) { in processAux()
1149 if (rel != 0) { in processAux()
1150 if (config->emachine == EM_MIPS && rel == target->symbolicRel) in processAux()
1151 rel = target->relativeRel; in processAux()
1173 part.relaDyn->addSymbolReloc(rel, *sec, offset, sym, addend, type); in processAux()
1441 const RelTy &rel = *i; in scanOne() local
1442 uint32_t symIndex = rel.getSymbol(config->isMips64EL); in scanOne()
1446 type = rel.getType(config->isMips64EL); in scanOne()
1453 type = rel.getType(config->isMips64EL); in scanOne()
1458 uint64_t offset = getter.get(rel.r_offset); in scanOne()
1464 ? getAddend<ELFT>(rel) in scanOne()
1466 sec->content().data() + rel.r_offset, type); in scanOne()
1468 addend += computeMipsAddend<ELFT>(rel, expr, sym.isLocal()); in scanOne()
1558 for (const RelTy &rel : rels) { in checkPPC64TLSRelax() local
1559 RelType type = rel.getType(false); in checkPPC64TLSRelax()
2060 const Relocation &rel, in getISDThunkSec() argument
2063 const int64_t pcBias = getPCBias(rel.type); in getISDThunkSec()
2068 if (target->inBranchRange(rel.type, src, in getISDThunkSec()
2079 if (!target->inBranchRange(rel.type, src, in getISDThunkSec()
2080 os->addr + thunkSecOff + rel.addend)) { in getISDThunkSec()
2082 if (!target->inBranchRange(rel.type, src, in getISDThunkSec()
2083 os->addr + thunkSecOff + rel.addend)) in getISDThunkSec()
2219 Relocation &rel, uint64_t src) { in getThunk() argument
2225 const int64_t pcBias = getPCBias(rel.type); in getThunk()
2226 const int64_t keyAddend = rel.addend + pcBias; in getThunk()
2233 if (auto *d = dyn_cast<Defined>(rel.sym)) in getThunk()
2238 thunkVec = &thunkedSymbols[{rel.sym, keyAddend}]; in getThunk()
2243 t->isCompatibleWith(*isec, rel) && in getThunk()
2244 target->inBranchRange(rel.type, src, in getThunk()
2249 Thunk *t = addThunk(*isec, rel); in getThunk()
2258 bool ThunkCreator::normalizeExistingThunk(Relocation &rel, uint64_t src) { in normalizeExistingThunk() argument
2259 if (Thunk *t = thunks.lookup(rel.sym)) { in normalizeExistingThunk()
2260 if (target->inBranchRange(rel.type, src, rel.sym->getVA(rel.addend))) in normalizeExistingThunk()
2262 rel.sym = &t->destination; in normalizeExistingThunk()
2263 rel.addend = t->addend; in normalizeExistingThunk()
2264 if (rel.sym->isInPlt()) in normalizeExistingThunk()
2265 rel.expr = toPlt(rel.expr); in normalizeExistingThunk()
2311 for (Relocation &rel : isec->relocs()) { in createThunks()
2312 uint64_t src = isec->getVA(rel.offset); in createThunks()
2317 if (pass > 0 && normalizeExistingThunk(rel, src)) in createThunks()
2320 if (!target->needsThunk(rel.expr, rel.type, isec->file, src, in createThunks()
2321 *rel.sym, rel.addend)) in createThunks()
2326 std::tie(t, isNew) = getThunk(isec, rel, src); in createThunks()
2334 ts = getISDThunkSec(os, isec, isd, rel, src); in createThunks()
2340 rel.sym = t->getThunkTargetSym(); in createThunks()
2341 rel.expr = fromPlt(rel.expr); in createThunks()
2347 rel.addend = -getPCBias(rel.type); in createThunks()
2371 for (Relocation &rel : isec->relocs()) in hexagonNeedsTLSSymbol()
2372 if (rel.sym->type == llvm::ELF::STT_TLS && rel.expr == R_PLT_PC) { in hexagonNeedsTLSSymbol()
2388 for (Relocation &rel : isec->relocs()) in hexagonTLSSymbolUpdate()
2389 if (rel.sym->type == llvm::ELF::STT_TLS && rel.expr == R_PLT_PC) { in hexagonTLSSymbolUpdate()
2396 rel.sym = sym; in hexagonTLSSymbolUpdate()