forked from OSchip/llvm-project
[WebAssembly] Fix faulty logic in verifyRelocTargets
This commit is contained in:
parent
634f173830
commit
cbf99e0fba
|
@ -78,7 +78,7 @@ void InputChunk::verifyRelocTargets() const {
|
|||
if (bytesRead && bytesRead != 5)
|
||||
warn("expected LEB at relocation site be 5-byte padded");
|
||||
|
||||
if (rel.Type != R_WASM_GLOBAL_INDEX_LEB ||
|
||||
if (rel.Type != R_WASM_GLOBAL_INDEX_LEB &&
|
||||
rel.Type != R_WASM_GLOBAL_INDEX_I32) {
|
||||
uint32_t expectedValue = file->calcExpectedValue(rel);
|
||||
if (expectedValue != existingValue)
|
||||
|
|
Loading…
Reference in New Issue