Skip to content

Commit 2e2387d

Browse files
committed
CHB:ARM:add support for call-back tables
1 parent 12f6be0 commit 2e2387d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

CodeHawk/CHB/bchlibarm32/bCHDisassembleARM.ml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,24 @@ let record_call_targets_arm () =
877877
finfo#set_call_target
878878
ctxtiaddr (mk_app_target tgt#get_absolute_address)
879879
end
880+
| Branch _
881+
| BranchExchange _
882+
when system_info#has_call_target faddr instr#get_address ->
883+
let calltgt = system_info#get_call_target faddr instr#get_address in
884+
let ctinfo = mk_call_target_info calltgt in
885+
let _ =
886+
chlog#add
887+
"call-back table target"
888+
(LBLOCK [
889+
STR "(";
890+
faddr#toPretty;
891+
STR ", ";
892+
STR ctxtiaddr;
893+
STR "): ";
894+
ctinfo#toPretty
895+
]) in
896+
finfo#set_call_target ctxtiaddr ctinfo
897+
880898
| _ -> ())
881899
end
882900
with

0 commit comments

Comments
 (0)