mirror of https://github.com/xemu-project/xemu.git
tcg/i386: Return false on failure from patch_reloc
Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
6ac1778676
commit
bec3afd5fc
|
@ -175,7 +175,7 @@ static bool patch_reloc(tcg_insn_unit *code_ptr, int type,
|
||||||
case R_386_PC32:
|
case R_386_PC32:
|
||||||
value -= (uintptr_t)code_ptr;
|
value -= (uintptr_t)code_ptr;
|
||||||
if (value != (int32_t)value) {
|
if (value != (int32_t)value) {
|
||||||
tcg_abort();
|
return false;
|
||||||
}
|
}
|
||||||
/* FALLTHRU */
|
/* FALLTHRU */
|
||||||
case R_386_32:
|
case R_386_32:
|
||||||
|
@ -184,7 +184,7 @@ static bool patch_reloc(tcg_insn_unit *code_ptr, int type,
|
||||||
case R_386_PC8:
|
case R_386_PC8:
|
||||||
value -= (uintptr_t)code_ptr;
|
value -= (uintptr_t)code_ptr;
|
||||||
if (value != (int8_t)value) {
|
if (value != (int8_t)value) {
|
||||||
tcg_abort();
|
return false;
|
||||||
}
|
}
|
||||||
tcg_patch8(code_ptr, value);
|
tcg_patch8(code_ptr, value);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue