Skip to content

Commit 1137b9e

Browse files
committed
Split out lld changes
Created using spr 1.3.6-beta.1
1 parent 7cb284e commit 1137b9e

File tree

5 files changed

+3
-61
lines changed

5 files changed

+3
-61
lines changed

lld/ELF/Arch/AArch64.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ AArch64::AArch64(Ctx &ctx) : TargetInfo(ctx) {
114114
copyRel = R_AARCH64_COPY;
115115
relativeRel = R_AARCH64_RELATIVE;
116116
iRelativeRel = R_AARCH64_IRELATIVE;
117-
iRelSymbolicRel = R_AARCH64_FUNCINIT64;
118117
gotRel = R_AARCH64_GLOB_DAT;
119118
pltRel = R_AARCH64_JUMP_SLOT;
120119
symbolicRel = R_AARCH64_ABS64;
@@ -138,7 +137,6 @@ RelExpr AArch64::getRelExpr(RelType type, const Symbol &s,
138137
case R_AARCH64_ABS16:
139138
case R_AARCH64_ABS32:
140139
case R_AARCH64_ABS64:
141-
case R_AARCH64_FUNCINIT64:
142140
case R_AARCH64_ADD_ABS_LO12_NC:
143141
case R_AARCH64_LDST128_ABS_LO12_NC:
144142
case R_AARCH64_LDST16_ABS_LO12_NC:
@@ -269,8 +267,7 @@ bool AArch64::usesOnlyLowPageBits(RelType type) const {
269267
}
270268

271269
RelType AArch64::getDynRel(RelType type) const {
272-
if (type == R_AARCH64_ABS64 || type == R_AARCH64_AUTH_ABS64 ||
273-
type == R_AARCH64_FUNCINIT64)
270+
if (type == R_AARCH64_ABS64 || type == R_AARCH64_AUTH_ABS64)
274271
return type;
275272
return R_AARCH64_NONE;
276273
}

lld/ELF/Relocations.cpp

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -989,8 +989,8 @@ bool RelocationScanner::isStaticLinkTimeConstant(RelExpr e, RelType type,
989989
// only the low bits are used.
990990
if (e == R_GOT || e == R_PLT)
991991
return ctx.target->usesOnlyLowPageBits(type) || !ctx.arg.isPic;
992-
// R_AARCH64_AUTH_ABS64 and iRelSymbolicRel require a dynamic relocation.
993-
if (e == RE_AARCH64_AUTH || type == ctx.target->iRelSymbolicRel)
992+
// R_AARCH64_AUTH_ABS64 requires a dynamic relocation.
993+
if (e == RE_AARCH64_AUTH)
994994
return false;
995995

996996
// The behavior of an undefined weak reference is implementation defined.
@@ -1163,23 +1163,6 @@ void RelocationScanner::processAux(RelExpr expr, RelType type, uint64_t offset,
11631163
}
11641164
return;
11651165
}
1166-
if (LLVM_UNLIKELY(type == ctx.target->iRelSymbolicRel)) {
1167-
if (sym.isPreemptible) {
1168-
auto diag = Err(ctx);
1169-
diag << "relocation " << type
1170-
<< " cannot be used against preemptible symbol '" << &sym << "'";
1171-
printLocation(diag, *sec, sym, offset);
1172-
} else if (isIfunc) {
1173-
auto diag = Err(ctx);
1174-
diag << "relocation " << type
1175-
<< " cannot be used against ifunc symbol '" << &sym << "'";
1176-
printLocation(diag, *sec, sym, offset);
1177-
} else {
1178-
part.relaDyn->addReloc({ctx.target->iRelativeRel, sec, offset, false,
1179-
sym, addend, R_ABS});
1180-
return;
1181-
}
1182-
}
11831166
part.relaDyn->addSymbolReloc(rel, *sec, offset, sym, addend, type);
11841167

11851168
// MIPS ABI turns using of GOT and dynamic relocations inside out.

lld/ELF/Target.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ class TargetInfo {
134134
RelType relativeRel = 0;
135135
RelType iRelativeRel = 0;
136136
RelType symbolicRel = 0;
137-
RelType iRelSymbolicRel = 0;
138137
RelType tlsDescRel = 0;
139138
RelType tlsGotRel = 0;
140139
RelType tlsModuleIndexRel = 0;

lld/test/ELF/aarch64-funcinit64-invalid.s

Lines changed: 0 additions & 18 deletions
This file was deleted.

lld/test/ELF/aarch64-funcinit64.s

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)