mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 13:35:38 +08:00
[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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user