tcg/i386: Return false on failure from patch_reloc

Backports commit bec3afd5fc6ab0b6e9d8a01575d58db8d1ad82ce from qemu
This commit is contained in:
Richard Henderson 2018-12-18 05:27:12 -05:00 committed by Lioncash
parent 46189d87b3
commit fc86fd34ff
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -182,7 +182,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:
@ -191,7 +191,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;