forked from OSchip/llvm-project
[BOLT] Fix rodata load simplification pass
Summary: If the target address has a runtime relocation against it, do not perform the load simplification. (cherry picked from FBD29091939)
This commit is contained in:
parent
f7f0a571d7
commit
1efadeedf2
|
@ -1097,7 +1097,8 @@ bool SimplifyRODataLoads::simplifyRODataLoads(
|
|||
if (!DataSection || !DataSection->isReadOnly())
|
||||
continue;
|
||||
|
||||
if (BC.getRelocationAt(TargetAddress))
|
||||
if (BC.getRelocationAt(TargetAddress) ||
|
||||
BC.getDynamicRelocationAt(TargetAddress))
|
||||
continue;
|
||||
|
||||
uint32_t Offset = TargetAddress - DataSection->getAddress();
|
||||
|
|
Loading…
Reference in New Issue