File tree Expand file tree Collapse file tree 1 file changed +3
-20
lines changed Expand file tree Collapse file tree 1 file changed +3
-20
lines changed Original file line number Diff line number Diff line change 51
51
mov x5 , x0
52
52
mov x4 , x1
53
53
54
- // Save lr , context pointer , main thread handler
55
- adrp x0 , _aslr_base
56
- str x6 , [ x0 , #:lo12:_aslr_base ]
54
+ // Save ASLR Base to use later
55
+ mov x0 , x6
57
56
58
57
// clear .bss
59
58
adrp x5 , __bss_start
@@ -70,26 +69,10 @@ bssloop:
70
69
71
70
run:
72
71
// process .dynamic section
73
- adrp x0 , _aslr_base
74
- ldr x0 , [ x0 , #:lo12:_aslr_base ]
72
+ // ASLR base on x0
75
73
adrp x1 , _DYNAMIC
76
74
add x1 , x1 , #:lo12:_DYNAMIC
77
75
bl __dynamic_loader
78
76
79
- // set LR to svcExitProcess if it's null
80
- adrp x3 , exit
81
- add x3 , x3 , #:lo12:exit
82
- cmp x30 , xzr
83
- csel x30 , x3 , x30 , eq
84
-
85
77
// call entrypoint
86
- mov x3 , sp
87
- sub sp , sp , 0x10
88
- stp x29 , x30 , [ sp ]
89
78
b main
90
-
91
- . section .data.horizon
92
- . align 8
93
- . global _aslr_base // Placeholder for ASLR Base Address
94
- _aslr_base:
95
- . dword 0
You can’t perform that action at this time.
0 commit comments