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:
Richard Henderson 2018-11-30 12:31:59 -08:00
parent 6ac1778676
commit bec3afd5fc

View File

@ -175,7 +175,7 @@ static bool patch_reloc(tcg_insn_unit *code_ptr, int type,
case R_386_PC32:
value -= (uintptr_t)code_ptr;
if (value != (int32_t)value) {
tcg_abort();
return false;
}
/* FALLTHRU */
case R_386_32:
@ -184,7 +184,7 @@ static bool patch_reloc(tcg_insn_unit *code_ptr, int type,
case R_386_PC8:
value -= (uintptr_t)code_ptr;
if (value != (int8_t)value) {
tcg_abort();
return false;
}
tcg_patch8(code_ptr, value);
break;