@@ -24,9 +24,6 @@ def __init__(self, compiler_arch_option):
2424 if CompilerArchOption .X86_64 == self .compiler_arch_option :
2525 self .word_size = 8
2626
27- def get_jump_hook_bytes (self , jump_hook_goto ):
28- raise NotImplementedError ()
29-
3027 def get_ret_bytes (self ):
3128 return b"\xc3 " # "ret" in x86
3229
@@ -69,9 +66,6 @@ def __init__(self, compiler_arch_option):
6966 CompilerArchOption .ARMLE ,
7067 ]
7168
72- def get_jump_hook_bytes (self , jump_hook_goto ):
73- raise NotImplementedError ()
74-
7569 def get_ret_bytes (self ):
7670 val = 0xe12fff1e # "bx lr" in ARM
7771
@@ -105,21 +99,6 @@ def __init__(self, compiler_arch_option):
10599 CompilerArchOption .MIPSLE ,
106100 ]
107101
108- def get_jump_hook_bytes (self , jump_hook_goto ):
109- EXPECTED_HOOK = [
110- 0x3c020000 + (jump_hook_goto >> 16 ),
111- 0x24420000 + (jump_hook_goto & 0xffff ),
112- 0x00400008 ,
113- 0x00000000 ,
114- ]
115-
116- if CompilerArchOption .MIPSBE == self .compiler_arch_option :
117- return b"" .join (map (lambda x : x .to_bytes (4 , 'big' ), EXPECTED_HOOK ))
118- elif CompilerArchOption .MIPSLE == self .compiler_arch_option :
119- return b"" .join (map (lambda x : x .to_bytes (4 , 'little' ), EXPECTED_HOOK ))
120- else :
121- raise NotImplementedError ()
122-
123102 def get_ret_bytes (self ):
124103 val = 0x03e00008 # "jr $ra" in MIPS
125104
0 commit comments