Repair a few mismerges in r320041 and r320042.
This commit is contained in:
parent
4198293b25
commit
f32b3b5783
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/clang500-import/; revision=320053
@ -142,9 +142,9 @@ bool XRayInstrumentation::runOnMachineFunction(MachineFunction &MF) {
|
||||
return false; // Invalid value for threshold.
|
||||
|
||||
// Count the number of MachineInstr`s in MachineFunction
|
||||
int64_t MICount = 0;
|
||||
for (const auto& MBB : MF)
|
||||
MICount += MBB.size();
|
||||
int64_t MICount = 0;
|
||||
for (const auto& MBB : MF)
|
||||
MICount += MBB.size();
|
||||
|
||||
// Check if we have a loop.
|
||||
// FIXME: Maybe make this smarter, and see whether the loops are dependent
|
||||
|
@ -467,7 +467,6 @@ static uint64_t getRelocTargetVA(uint32_t Type, int64_t A, uint64_t P,
|
||||
case R_GOTREL_FROM_END:
|
||||
return Body.getVA(A) - InX::Got->getVA() - InX::Got->getSize();
|
||||
case R_GOT_FROM_END:
|
||||
case R_GOT_FROM_END:
|
||||
case R_RELAX_TLS_GD_TO_IE_END:
|
||||
return Body.getGotOffset() + A - InX::Got->getSize();
|
||||
case R_GOT_OFF:
|
||||
@ -476,7 +475,6 @@ static uint64_t getRelocTargetVA(uint32_t Type, int64_t A, uint64_t P,
|
||||
case R_RELAX_TLS_GD_TO_IE_PAGE_PC:
|
||||
return getAArch64Page(Body.getGotVA() + A) - getAArch64Page(P);
|
||||
case R_GOT_PC:
|
||||
case R_GOT_PC:
|
||||
case R_RELAX_TLS_GD_TO_IE:
|
||||
return Body.getGotVA() + A - P;
|
||||
case R_HINT:
|
||||
@ -546,36 +544,6 @@ static uint64_t getRelocTargetVA(uint32_t Type, int64_t A, uint64_t P,
|
||||
case R_PLT_PC:
|
||||
case R_PPC_PLT_OPD:
|
||||
return Body.getPltVA() + A - P;
|
||||
case R_PAGE_PC:
|
||||
case R_PLT_PAGE_PC: {
|
||||
uint64_t Dest;
|
||||
if (Body.isUndefined() && !Body.isLocal() && Body.symbol()->isWeak())
|
||||
Dest = getAArch64Page(A);
|
||||
else
|
||||
Dest = getAArch64Page(Body.getVA<ELFT>(A));
|
||||
return Dest - getAArch64Page(P);
|
||||
}
|
||||
case R_PC: {
|
||||
uint64_t Dest;
|
||||
if (Body.isUndefined() && !Body.isLocal() && Body.symbol()->isWeak()) {
|
||||
// On ARM and AArch64 a branch to an undefined weak resolves to the
|
||||
// next instruction, otherwise the place.
|
||||
if (Config->EMachine == EM_ARM)
|
||||
Dest = getARMUndefinedRelativeWeakVA(Type, A, P);
|
||||
else if (Config->EMachine == EM_AARCH64)
|
||||
Dest = getAArch64UndefinedRelativeWeakVA(Type, A, P);
|
||||
else
|
||||
Dest = Body.getVA<ELFT>(A);
|
||||
} else {
|
||||
Dest = Body.getVA<ELFT>(A);
|
||||
}
|
||||
return Dest - P;
|
||||
}
|
||||
case R_PLT:
|
||||
return Body.getPltVA<ELFT>() + A;
|
||||
case R_PLT_PC:
|
||||
case R_PPC_PLT_OPD:
|
||||
return Body.getPltVA<ELFT>() + A - P;
|
||||
case R_PPC_OPD: {
|
||||
uint64_t SymVA = Body.getVA(A);
|
||||
// If we have an undefined weak symbol, we might get here with a symbol
|
||||
|
Loading…
Reference in New Issue
Block a user