forked from OSchip/llvm-project
[BOLT] Cover PIC jump table reference in non-strict mode
Summary: In non-strict relocation mode it was possible to miss a jump table reference leading to incorrect code. (cherry picked from FBD21251467)
This commit is contained in:
parent
ac36e17a73
commit
b62a1774af
|
@ -433,9 +433,9 @@ BinaryContext::handleAddressRef(uint64_t Address, BinaryFunction &BF,
|
|||
}
|
||||
}
|
||||
|
||||
// In strict relocation mode, we have to catch jump table references outside
|
||||
// of the basic block containing the indirect jump.
|
||||
if (opts::StrictMode) {
|
||||
// With relocations, catch jump table references outside of the basic block
|
||||
// containing the indirect jump.
|
||||
if (HasRelocations) {
|
||||
const auto MemType = analyzeMemoryAt(Address, BF);
|
||||
if (MemType == MemoryContentsType::POSSIBLE_PIC_JUMP_TABLE && IsPCRel) {
|
||||
const MCSymbol *Symbol =
|
||||
|
|
Loading…
Reference in New Issue