-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commit start of new GNU-AS based ASM stubs to prepare for AARCH64 sup…
…port
- Loading branch information
1 parent
dd88635
commit 6001541
Showing
10 changed files
with
127 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// | ||
// GRIMREAPER | ||
// | ||
// Austin Hudson | ||
// | ||
// suspicious.actor | ||
// | ||
|
||
// Section for our code | ||
.section .text$C, "xr" | ||
|
||
// Exported symbol name | ||
.globl GetIp | ||
|
||
GetIp: | ||
// execute the next instruction | ||
call _next_instruction | ||
|
||
_next_instruction: | ||
// pop the return address off the stack | ||
popq %rax | ||
|
||
// subtract the difference between the two labels | ||
subq $(_next_instruction - GetIp), %rax | ||
|
||
// return the pointer | ||
ret | ||
|
||
Leave: | ||
// Marker | ||
.string "ENDOFCODE" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// | ||
// GRIMREAPER | ||
// | ||
// Austin Hudson | ||
// | ||
// suspicious.actor | ||
// | ||
|
||
// Section for our code | ||
.section .text$A, "xr" | ||
|
||
// Exported symbol name | ||
.globl Start | ||
|
||
// Imported symbol name | ||
.extern Entry | ||
|
||
Start: | ||
// Setup the stack | ||
pushq %rsi | ||
movq %rsp, %rsi | ||
andq $-16, %rsp | ||
|
||
// Execute the entrypoint | ||
subq $32, %rsp | ||
call Entry | ||
|
||
// Cleanup the stack | ||
movq %rsi, %rsp | ||
popq %rsi | ||
|
||
// Return | ||
ret |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// | ||
// GRIMREAPER | ||
// | ||
// Austin Hudson | ||
// | ||
// suspicious.actor | ||
// | ||
|
||
// Section for our code | ||
.section .text$C, "xr" | ||
|
||
// Exported symbol name | ||
.globl _GetIp | ||
|
||
_GetIp: | ||
// execute the next instruction | ||
call __next_instruction | ||
|
||
__next_instruction: | ||
// pop the return address off the stack | ||
popl %eax | ||
|
||
// subtract the difference between the two labels | ||
subl $(__next_instruction - _GetIp), %eax | ||
|
||
// return the pointer | ||
ret | ||
|
||
_Leave: | ||
.string "ENDOFCODE" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// | ||
// GRIMREAPER | ||
// | ||
// Austin Hudson | ||
// | ||
// suspicious.actor | ||
// | ||
|
||
// Section for our code | ||
.section .text$A, "xr" | ||
|
||
// Exported symbol name | ||
.globl _Start | ||
|
||
// Imported symbol name | ||
.extern _Entry@0 | ||
|
||
_Start: | ||
// Setup the stack | ||
pushl %ebp | ||
movl %esp, %ebp | ||
|
||
// Execute the entrypoint | ||
call _Entry@0 | ||
|
||
// Cleanup the stack | ||
movl %ebp, %esp | ||
popl %ebp | ||
|
||
// Return | ||
ret |