bool usesOnlyLowPageBits(RelType type) const override;
void relocate(uint8_t *loc, const Relocation &rel,
uint64_t val) const override;
- RelExpr adjustRelaxExpr(RelType type, const uint8_t *data,
- RelExpr expr) const override;
+ RelExpr adjustTlsExpr(RelType type, RelExpr expr) const override;
void relaxTlsGdToLe(uint8_t *loc, const Relocation &rel,
uint64_t val) const override;
void relaxTlsGdToIe(uint8_t *loc, const Relocation &rel,
}
}
-RelExpr AArch64::adjustRelaxExpr(RelType type, const uint8_t *data,
- RelExpr expr) const {
+RelExpr AArch64::adjustTlsExpr(RelType type, RelExpr expr) const {
if (expr == R_RELAX_TLS_GD_TO_IE) {
if (type == R_AARCH64_TLSDESC_ADR_PAGE21)
return R_AARCH64_RELAX_TLS_GD_TO_IE_PAGE_PC;
bool inBranchRange(RelType type, uint64_t src, uint64_t dst) const override;
void relocate(uint8_t *loc, const Relocation &rel,
uint64_t val) const override;
- RelExpr adjustRelaxExpr(RelType type, const uint8_t *data,
- RelExpr expr) const override;
+ RelExpr adjustTlsExpr(RelType type, RelExpr expr) const override;
int getTlsGdRelaxSkip(RelType type) const override;
void relaxTlsGdToIe(uint8_t *loc, const Relocation &rel,
uint64_t val) const override;
}
}
-RelExpr PPC::adjustRelaxExpr(RelType type, const uint8_t *data,
- RelExpr expr) const {
+RelExpr PPC::adjustTlsExpr(RelType type, RelExpr expr) const {
if (expr == R_RELAX_TLS_GD_TO_IE)
return R_RELAX_TLS_GD_TO_IE_GOT_OFF;
if (expr == R_RELAX_TLS_LD_TO_LE)
int64_t a) const override;
uint32_t getThunkSectionSpacing() const override;
bool inBranchRange(RelType type, uint64_t src, uint64_t dst) const override;
- RelExpr adjustRelaxExpr(RelType type, const uint8_t *data,
- RelExpr expr) const override;
+ RelExpr adjustTlsExpr(RelType type, RelExpr expr) const override;
RelExpr adjustGotPcExpr(RelType type, int64_t addend,
const uint8_t *loc) const override;
void relaxGot(uint8_t *loc, const Relocation &rel,
llvm_unreachable("unsupported relocation type used in branch");
}
-RelExpr PPC64::adjustRelaxExpr(RelType type, const uint8_t *data,
- RelExpr expr) const {
+RelExpr PPC64::adjustTlsExpr(RelType type, RelExpr expr) const {
if (type != R_PPC64_GOT_TLSGD_PCREL34 && expr == R_RELAX_TLS_GD_TO_IE)
return R_RELAX_TLS_GD_TO_IE_GOT_OFF;
if (expr == R_RELAX_TLS_LD_TO_LE)
void relocate(uint8_t *loc, const Relocation &rel,
uint64_t val) const override;
- RelExpr adjustRelaxExpr(RelType type, const uint8_t *data,
- RelExpr expr) const override;
+ RelExpr adjustTlsExpr(RelType type, RelExpr expr) const override;
void relaxTlsGdToIe(uint8_t *loc, const Relocation &rel,
uint64_t val) const override;
void relaxTlsGdToLe(uint8_t *loc, const Relocation &rel,
}
}
-RelExpr X86::adjustRelaxExpr(RelType type, const uint8_t *data,
- RelExpr expr) const {
+RelExpr X86::adjustTlsExpr(RelType type, RelExpr expr) const {
switch (expr) {
default:
return expr;
// Local-Dynamic relocs can be relaxed to Local-Exec.
if (toExecRelax) {
c.relocations.push_back(
- {target->adjustRelaxExpr(type, nullptr, R_RELAX_TLS_LD_TO_LE), type,
- offset, addend, &sym});
+ {target->adjustTlsExpr(type, R_RELAX_TLS_LD_TO_LE), type, offset,
+ addend, &sym});
return target->getTlsGdRelaxSkip(type);
}
if (expr == R_TLSLD_HINT)
// Local-Dynamic relocs can be relaxed to Local-Exec.
if (expr == R_DTPREL && toExecRelax) {
- c.relocations.push_back(
- {target->adjustRelaxExpr(type, nullptr, R_RELAX_TLS_LD_TO_LE), type,
- offset, addend, &sym});
+ c.relocations.push_back({target->adjustTlsExpr(type, R_RELAX_TLS_LD_TO_LE),
+ type, offset, addend, &sym});
return 1;
}
// depending on the symbol being locally defined or not.
if (sym.isPreemptible) {
c.relocations.push_back(
- {target->adjustRelaxExpr(type, nullptr, R_RELAX_TLS_GD_TO_IE), type,
- offset, addend, &sym});
+ {target->adjustTlsExpr(type, R_RELAX_TLS_GD_TO_IE), type, offset,
+ addend, &sym});
if (!sym.isInGot()) {
in.got->addEntry(sym);
mainPart->relaDyn->addReloc(target->tlsGotRel, in.got, sym.getGotOffset(),
}
} else {
c.relocations.push_back(
- {target->adjustRelaxExpr(type, nullptr, R_RELAX_TLS_GD_TO_LE), type,
- offset, addend, &sym});
+ {target->adjustTlsExpr(type, R_RELAX_TLS_GD_TO_LE), type, offset,
+ addend, &sym});
}
return target->getTlsGdRelaxSkip(type);
}
return true;
}
-RelExpr TargetInfo::adjustRelaxExpr(RelType type, const uint8_t *data,
- RelExpr expr) const {
+RelExpr TargetInfo::adjustTlsExpr(RelType type, RelExpr expr) const {
return expr;
}
// non-split-stack callee this will return true. Otherwise returns false.
bool needsMoreStackNonSplit = true;
- virtual RelExpr adjustRelaxExpr(RelType type, const uint8_t *data,
- RelExpr expr) const;
+ virtual RelExpr adjustTlsExpr(RelType type, RelExpr expr) const;
virtual RelExpr adjustGotPcExpr(RelType type, int64_t addend,
const uint8_t *loc) const;
virtual void relaxGot(uint8_t *loc, const Relocation &rel,