@@ -31,7 +31,7 @@ uint64_t elf::getAArch64Page(uint64_t expr) {
31
31
namespace {
32
32
class AArch64 : public TargetInfo {
33
33
public:
34
- AArch64 ();
34
+ AArch64 (Ctx & );
35
35
RelExpr getRelExpr (RelType type, const Symbol &s,
36
36
const uint8_t *loc) const override ;
37
37
RelType getDynRel (RelType type) const override ;
@@ -76,7 +76,7 @@ static uint64_t getBits(uint64_t val, int start, int end) {
76
76
return (val >> start) & mask;
77
77
}
78
78
79
- AArch64::AArch64 () {
79
+ AArch64::AArch64 (Ctx &ctx) : TargetInfo(ctx ) {
80
80
copyRel = R_AARCH64_COPY;
81
81
relativeRel = R_AARCH64_RELATIVE;
82
82
iRelativeRel = R_AARCH64_IRELATIVE;
@@ -960,7 +960,7 @@ void AArch64::relocateAlloc(InputSectionBase &sec, uint8_t *buf) const {
960
960
namespace {
961
961
class AArch64BtiPac final : public AArch64 {
962
962
public:
963
- AArch64BtiPac ();
963
+ AArch64BtiPac (Ctx & );
964
964
void writePltHeader (uint8_t *buf) const override ;
965
965
void writePlt (uint8_t *buf, const Symbol &sym,
966
966
uint64_t pltEntryAddr) const override ;
@@ -971,7 +971,7 @@ class AArch64BtiPac final : public AArch64 {
971
971
};
972
972
} // namespace
973
973
974
- AArch64BtiPac::AArch64BtiPac () {
974
+ AArch64BtiPac::AArch64BtiPac (Ctx &ctx) : AArch64(ctx ) {
975
975
btiHeader = (ctx.arg .andFeatures & GNU_PROPERTY_AARCH64_FEATURE_1_BTI);
976
976
// A BTI (Branch Target Indicator) Plt Entry is only required if the
977
977
// address of the PLT entry can be taken by the program, which permits an
@@ -1176,12 +1176,12 @@ void lld::elf::createTaggedSymbols(const SmallVector<ELFFileBase *, 0> &files) {
1176
1176
}
1177
1177
}
1178
1178
1179
- TargetInfo *elf::getAArch64TargetInfo () {
1179
+ TargetInfo *elf::getAArch64TargetInfo (Ctx &ctx ) {
1180
1180
if ((ctx.arg .andFeatures & GNU_PROPERTY_AARCH64_FEATURE_1_BTI) ||
1181
1181
ctx.arg .zPacPlt ) {
1182
- static AArch64BtiPac t;
1182
+ static AArch64BtiPac t (ctx) ;
1183
1183
return &t;
1184
1184
}
1185
- static AArch64 t;
1185
+ static AArch64 t (ctx) ;
1186
1186
return &t;
1187
1187
}
0 commit comments