reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

Declarations

tools/lld/ELF/Target.h
  188 extern const TargetInfo *target;

References

tools/lld/ELF/AArch64ErrataFix.cpp
  420   target->relocateOne(buf + 4, R_AARCH64_JUMP26, s - p);
  486   uint64_t patchUpperBound = prevIsecLimit + target->getThunkSectionSpacing();
  503       patchUpperBound = prevIsecLimit + target->getThunkSectionSpacing();
tools/lld/ELF/ARMErrataFix.cpp
  159     offset = target->getImplicitAddend(buf, R_ARM_THM_JUMP19);
  161     offset = target->getImplicitAddend(buf, R_ARM_THM_JUMP24);
  163     offset = target->getImplicitAddend(buf, R_ARM_THM_CALL);
  188   target->relocateOne(buf, isARM ? R_ARM_JUMP24 : R_ARM_THM_JUMP24, s - p);
  224   return target->inBranchRange(
tools/lld/ELF/Arch/PPC.cpp
   87     uint32_t afterBcl = in.plt->getSize() - target->pltHeaderSize + 12;
tools/lld/ELF/Arch/PPC64.cpp
  189   target->relaxGot(bufLoc, type, tocRelative + ppc64TocOffset);
tools/lld/ELF/Arch/RISCV.cpp
  158   write32le(buf + 12, itype(ADDI, X_T1, X_T1, -target->pltHeaderSize - 12));
  180   return type == target->symbolicRel ? type
tools/lld/ELF/Driver.cpp
  489   target = getTarget();
 1272                                        target->defaultMaxPageSize);
 1276     if (val != target->defaultMaxPageSize)
 1287                                        target->defaultCommonPageSize);
 1291     if (val != target->defaultCommonPageSize)
 1885   target = getTarget();
 1887   config->eflags = target->calcEFlags();
tools/lld/ELF/InputSection.cpp
  466         addend = target->getImplicitAddend(bufLoc, type);
  469           target->getRelExpr(type, sym, bufLoc) == R_MIPS_GOTREL) {
  486       else if (config->relocatable && type != target->noneRel)
  849       addend += target->getImplicitAddend(bufLoc, type);
  852     RelExpr expr = target->getRelExpr(type, sym, bufLoc);
  873       target->relocateOne(bufLoc, type,
  879       target->relocateOne(bufLoc, type, 0);
  881       target->relocateOne(bufLoc, type, SignExtend64<bits>(sym.getVA(addend)));
  898     target->relocateOne(bufLoc, rel.type, targetVA);
  941       target->relaxGot(bufLoc, type, targetVA);
  945         target->relocateOne(bufLoc, type, targetVA);
  948       target->relaxTlsIeToLe(bufLoc, type, targetVA);
  952       target->relaxTlsLdToLe(bufLoc, type, targetVA);
  956       target->relaxTlsGdToLe(bufLoc, type, targetVA);
  963       target->relaxTlsGdToIe(bufLoc, type, targetVA);
  980       target->relocateOne(bufLoc, type, targetVA);
  983       target->relocateOne(bufLoc, type, targetVA);
 1080       if (target->adjustPrologueForCrossSplitStack(buf + getOffset(f->value),
 1090   if (target->needsMoreStackNonSplit)
tools/lld/ELF/LinkerScript.cpp
 1089     dot = target->getImageBase();
tools/lld/ELF/MarkLive.cpp
   79   return target->getImplicitAddend(sec.data().begin() + rel.r_offset,
tools/lld/ELF/OutputSections.cpp
  487     return target->trapInstr;
tools/lld/ELF/Relocations.cpp
  172           {target->tlsDescRel, in.got, off, !sym.isPreemptible, &sym, 0});
  199           {target->adjustRelaxExpr(type, nullptr, R_RELAX_TLS_LD_TO_LE), type,
  201       return target->getTlsGdRelaxSkip(type);
  208             {R_ADDEND, target->symbolicRel, in.got->getTlsIndexOff(), 1, &sym});
  210         mainPart->relaDyn->addReloc(target->tlsModuleIndexRel, in.got,
  220         {target->adjustRelaxExpr(type, nullptr, R_RELAX_TLS_LD_TO_LE), type,
  232           {R_ABS, target->tlsOffsetRel, off, 0, &sym});
  247               {R_ADDEND, target->symbolicRel, off, 1, &sym});
  249           mainPart->relaDyn->addReloc(target->tlsModuleIndexRel, in.got, off, &sym);
  255           mainPart->relaDyn->addReloc(target->tlsOffsetRel, in.got, offsetOff,
  259               {R_ABS, target->tlsOffsetRel, offsetOff, 0, &sym});
  269           {target->adjustRelaxExpr(type, nullptr, R_RELAX_TLS_GD_TO_IE), type,
  273         mainPart->relaDyn->addReloc(target->tlsGotRel, in.got, sym.getGotOffset(),
  278           {target->adjustRelaxExpr(type, nullptr, R_RELAX_TLS_GD_TO_LE), type,
  281     return target->getTlsGdRelaxSkip(type);
  384     return target->usesOnlyLowPageBits(type) || !config->isPic;
  404     return target->usesOnlyLowPageBits(type);
  586   mainPart->relaDyn->addReloc(target->copyRel, sec, 0, &ss);
  618       return target->getImplicitAddend(buf + ri->r_offset, pairTy);
  639     addend = target->getImplicitAddend(buf + rel.r_offset, type);
  949   part.relaDyn->addReloc(target->relativeRel, isec, offsetInSec, sym, addend,
  978     in.got->relocations.push_back({expr, target->symbolicRel, off, 0, &sym});
  985     addRelativeReloc(in.got, off, &sym, 0, R_ABS, target->symbolicRel);
  989       sym.isTls() ? target->tlsGotRel : target->gotRel, in.got, off, &sym, 0,
  989       sym.isTls() ? target->tlsGotRel : target->gotRel, in.got, off, &sym, 0,
  990       sym.isPreemptible ? R_ADDEND : R_ABS, target->symbolicRel);
 1045     RelType rel = target->getDynRel(type);
 1046     if (expr == R_GOT || (rel == target->symbolicRel && !sym.isPreemptible)) {
 1050       if (config->emachine == EM_MIPS && rel == target->symbolicRel)
 1051         rel = target->relativeRel;
 1132         addPltEntry<ELFT>(in.plt, in.gotPlt, in.relaPlt, target->pltRel, sym);
 1136             target->pltHeaderSize + target->pltEntrySize * sym.pltIndex, 0);
 1136             target->pltHeaderSize + target->pltEntrySize * sym.pltIndex, 0);
 1191   RelExpr expr = target->getRelExpr(type, sym, relocatedAddr);
 1231       expr = target->adjustRelaxExpr(type, relocatedAddr, expr);
 1273       addPltEntry<ELFT>(in.plt, in.gotPlt, in.relaPlt, target->pltRel, sym);
 1343       addPltEntry<ELFT>(in.iplt, in.igotPlt, in.relaIplt, target->iRelativeRel,
 1357       unsigned entryOffset = sym.pltIndex * target->pltEntrySize;
 1359         entryOffset += target->pltHeaderSize;
 1588     if (target->inBranchRange(type, src, (src > tsLimit) ? tsBase : tsLimit))
 1598   if (!target->inBranchRange(type, src, os->addr + thunkSecOff)) {
 1600     if (!target->inBranchRange(type, src, os->addr + thunkSecOff))
 1654   uint32_t thunkSectionSpacing = target->getThunkSectionSpacing();
 1720         target->inBranchRange(rel.type, src, t->getThunkTargetSym()->getVA()))
 1735     if (target->inBranchRange(rel.type, src, rel.sym->getVA()))
 1772   if (pass == 0 && target->getThunkSectionSpacing())
 1792             if (!target->needsThunk(rel.expr, rel.type, isec->file, src,
tools/lld/ELF/ScriptParser.cpp
 1037     if (target)
tools/lld/ELF/Symbols.cpp
  162   return (pltIndex + target->gotPltHeaderEntriesNum) * config->wordsize;
  173       plt->getVA() + plt->headerSize + pltIndex * target->pltEntrySize;
tools/lld/ELF/SyntheticSections.cpp
  605   if (ElfSym::globalOffsetTable && !target->gotBaseSymInGotPlt)
  606     numEntries += target->gotHeaderEntriesNum;
  655   target->writeGotHeader(buf);
  945         mainPart->relaDyn->addReloc(target->tlsGotRel, this, offset, s);
  953         mainPart->relaDyn->addReloc(target->tlsModuleIndexRel, this, offset, s);
  961         mainPart->relaDyn->addReloc(target->tlsModuleIndexRel, this, offset, s);
  967         mainPart->relaDyn->addReloc(target->tlsOffsetRel, this, offset, s);
  979       mainPart->relaDyn->addReloc(target->relativeRel, this, offset, p.first);
  989         mainPart->relaDyn->addReloc({target->relativeRel, this, offset, l.first,
  995       mainPart->relaDyn->addReloc({target->relativeRel, this, offset, true,
 1100   return (target->gotPltHeaderEntriesNum + entries.size()) * config->wordsize;
 1104   target->writeGotPltHeader(buf);
 1105   buf += target->gotPltHeaderEntriesNum * config->wordsize;
 1107     target->writeGotPlt(buf, *b);
 1149     target->writeIgotPlt(buf, *b);
 1459     addInt(DT_MIPS_BASE_ADDRESS, target->getImageBase());
 1488                          unsigned offset = target->pltHeaderSize - 32;
 1552   if (reloc.type == target->relativeRel)
 1607           return std::make_tuple(a.type != target->relativeRel,
 1609                  std::make_tuple(b.type != target->relativeRel,
 1694     if (r.getType(config->isMips64EL) == target->relativeRel)
 1792     add(target->relativeRel);
 1803     add(target->relativeRel);
 1818     add(target->relativeRel);
 2454       headerSize(!isIplt || config->zRetpolineplt ? target->pltHeaderSize : 0),
 2471     target->writePltHeader(buf);
 2484     target->writePlt(buf + off, got, plt, b->pltIndex, relOff);
 2485     off += target->pltEntrySize;
 2495   return headerSize + entries.size() * target->pltEntrySize;
 2503     target->addPltHeaderSymbols(*this);
 2507     target->addPltSymbols(*this, off);
 2508     off += target->pltEntrySize;
 3331       target->relocateOne(buf + offset, R_ARM_PREL31, s - p);
 3339   target->relocateOne(buf + offset, R_ARM_PREL31, s - p);
tools/lld/ELF/Thunks.cpp
  304         {target->relativeRel, in.ppc64LongBranchTarget,
  349   target->relocateOne(buf + 8, R_AARCH64_ABS64, s);
  373   target->relocateOne(buf, R_AARCH64_ADR_PREL_PG_HI21,
  375   target->relocateOne(buf + 4, R_AARCH64_ADD_ABS_LO12_NC, s);
  419   target->relocateOne(buf, R_ARM_JUMP24, offset);
  457   target->relocateOne(buf, R_ARM_THM_JUMP24, offset);
  474   target->relocateOne(buf, R_ARM_MOVW_ABS_NC, s);
  475   target->relocateOne(buf + 4, R_ARM_MOVT_ABS, s);
  492   target->relocateOne(buf, R_ARM_THM_MOVW_ABS_NC, s);
  493   target->relocateOne(buf + 4, R_ARM_THM_MOVT_ABS, s);
  513   target->relocateOne(buf, R_ARM_MOVW_PREL_NC, offset);
  514   target->relocateOne(buf + 4, R_ARM_MOVT_PREL, offset);
  534   target->relocateOne(buf, R_ARM_THM_MOVW_PREL_NC, offset);
  535   target->relocateOne(buf + 4, R_ARM_THM_MOVT_PREL, offset);
  550   target->relocateOne(buf + 4, R_ARM_ABS32, getARMThunkDestVA(destination));
  576   target->relocateOne(buf + 12, R_ARM_REL32, s - p - 12);
  606   target->relocateOne(buf + 8, R_ARM_ABS32, s);
  632   target->relocateOne(buf + 12, R_ARM_REL32, s - p - 12);
  649   target->relocateOne(buf, R_MIPS_HI16, s);
  650   target->relocateOne(buf + 8, R_MIPS_LO16, s);
  671   target->relocateOne(buf, R_MICROMIPS_HI16, s);
  672   target->relocateOne(buf + 4, R_MICROMIPS_26_S1, s);
  673   target->relocateOne(buf + 8, R_MICROMIPS_LO16, s);
  695   target->relocateOne(buf, R_MICROMIPS_HI16, s);
  696   target->relocateOne(buf + 4, R_MICROMIPS_LO16, s);
  697   target->relocateOne(buf + 8, R_MICROMIPS_PC26_S1, s - p - 12);
tools/lld/ELF/Writer.cpp
  492     if (target->gotBaseSymInGotPlt)
 1042     if (!target->gotBaseSymInGotPlt)
 1306   if (target->getThunkSectionSpacing() && !orderedSections.empty()) {
 1557     bool changed = target->needsThunks && tc.createThunks(outputSections);
 2617     memcpy(i, &target->trapInstr, 4);