Skip to content

Commit

Permalink
handle the version of binutils (take2)
Browse files Browse the repository at this point in the history
The 3rd parameter of init_disassemble_info() in new API needs to be
specify a non-null function address, which previous commit didn't
address.  This commit fixes it.

Signed-off-by: Hajime Tazaki <[email protected]>
  • Loading branch information
thehajime committed Jun 2, 2023
1 parent 04b615d commit 1f11942
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ static void disassemble_and_rewrite(char *code, size_t code_size, int mem_prot)
assert(!mprotect(code, code_size, PROT_WRITE | PROT_READ | PROT_EXEC));
disassemble_info disasm_info = { 0 };
#ifdef NEW_DIS_ASM
init_disassemble_info(&disasm_info, &s, NULL, do_rewrite);
init_disassemble_info(&disasm_info, &s, (fprintf_ftype) printf, do_rewrite);
#else
init_disassemble_info(&disasm_info, &s, do_rewrite);
#endif
Expand Down

0 comments on commit 1f11942

Please sign in to comment.