You need to sign in or sign up before continuing.
提交 bec3afd5 编写于 作者: R Richard Henderson

tcg/i386: Return false on failure from patch_reloc

Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
Signed-off-by: NRichard Henderson <richard.henderson@linaro.org>
上级 6ac17786
...@@ -175,7 +175,7 @@ static bool patch_reloc(tcg_insn_unit *code_ptr, int type, ...@@ -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, ...@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册