Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SandHook
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
SandHook
Commits
48cfbe09
Commit
48cfbe09
authored
May 12, 2019
by
swift_gan
Committed by
swift_gan
May 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tweak asm
parent
80c60326
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
2 deletions
+16
-2
inst_arm64.cpp
nativehook/src/main/cpp/archs/arm64/inst/inst_arm64.cpp
+9
-1
inst_arm64.h
nativehook/src/main/cpp/archs/arm64/inst/inst_arm64.h
+4
-0
code_relocate_a64.cpp
...k/src/main/cpp/archs/arm64/relocate/code_relocate_a64.cpp
+3
-1
No files found.
nativehook/src/main/cpp/archs/arm64/inst/inst_arm64.cpp
View file @
48cfbe09
...
@@ -18,7 +18,15 @@ U32 InstructionA64<InstStruct>::size() {
...
@@ -18,7 +18,15 @@ U32 InstructionA64<InstStruct>::size() {
//Unknow
//Unknow
A64_UNKNOW
::
A64_UNKNOW
(
STRUCT_A64
(
UNKNOW
)
&
inst
)
:
InstructionA64
(
&
inst
)
{
A64_UNKNOW
::
A64_UNKNOW
(
STRUCT_A64
(
UNKNOW
)
&
inst
)
:
InstructionA64
(
&
inst
)
{
inst_backup
=
inst
;
decode
(
&
inst
);
}
void
A64_UNKNOW
::
decode
(
A64_STRUCT_UNKNOW
*
inst
)
{
inst_backup
=
*
inst
;
}
void
A64_UNKNOW
::
assembler
()
{
set
(
inst_backup
);
}
}
//PC Rel Inst
//PC Rel Inst
...
...
nativehook/src/main/cpp/archs/arm64/inst/inst_arm64.h
View file @
48cfbe09
...
@@ -188,6 +188,10 @@ namespace SandHook {
...
@@ -188,6 +188,10 @@ namespace SandHook {
return
true
;
return
true
;
}
}
void
decode
(
A64_STRUCT_UNKNOW
*
inst
)
override
;
void
assembler
()
override
;
private
:
private
:
STRUCT_A64
(
UNKNOW
)
inst_backup
;
STRUCT_A64
(
UNKNOW
)
inst_backup
;
};
};
...
...
nativehook/src/main/cpp/archs/arm64/relocate/code_relocate_a64.cpp
View file @
48cfbe09
...
@@ -18,7 +18,7 @@ CodeRelocateA64::CodeRelocateA64(AssemblerA64 &assembler) : CodeRelocate(assembl
...
@@ -18,7 +18,7 @@ CodeRelocateA64::CodeRelocateA64(AssemblerA64 &assembler) : CodeRelocate(assembl
}
}
void
CodeRelocateA64
::
relocate
(
void
*
startPc
,
void
*
toPc
,
Addr
len
)
throw
(
ErrorCodeException
)
{
void
CodeRelocateA64
::
relocate
(
void
*
startPc
,
void
*
toPc
,
Addr
len
)
throw
(
ErrorCodeException
)
{
__
finish
();
}
}
void
CodeRelocateA64
::
relocate
(
Instruction
<
Base
>
*
instruction
,
void
*
toPc
)
throw
(
ErrorCodeException
)
{
void
CodeRelocateA64
::
relocate
(
Instruction
<
Base
>
*
instruction
,
void
*
toPc
)
throw
(
ErrorCodeException
)
{
...
@@ -33,6 +33,8 @@ void CodeRelocateA64::relocate(Instruction<Base> *instruction, void *toPc) throw
...
@@ -33,6 +33,8 @@ void CodeRelocateA64::relocate(Instruction<Base> *instruction, void *toPc) throw
CASE
(
CBZ_CBNZ
)
CASE
(
CBZ_CBNZ
)
CASE
(
LDR_LIT
)
CASE
(
LDR_LIT
)
CASE
(
ADR_ADRP
)
CASE
(
ADR_ADRP
)
default
:
__
Emit
(
instruction
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment