@@ -25,7 +25,7 @@ void* (*memcpy)(void* dst, const void* src, size_t len) PAYLOAD_BSS;
25
25
void * (* memset )(void * s , int c , size_t n ) PAYLOAD_BSS ;
26
26
size_t (* strlen )(const char * str ) PAYLOAD_BSS ;
27
27
int (* printf )(const char * fmt , ...) PAYLOAD_BSS ;
28
- void (* eventhandler_register )(void * list , const char * name , void * func , void * key , void * arg , int priority ) PAYLOAD_BSS ; // 5.5x-6.72
28
+ void (* eventhandler_register )(void * list , const char * name , void * func , void * arg , int priority ) PAYLOAD_BSS ;
29
29
30
30
void * M_TEMP PAYLOAD_BSS ;
31
31
uint8_t * MINI_SYSCORE_SELF_BINARY PAYLOAD_BSS ;
@@ -84,9 +84,11 @@ extern void install_fpkg_hooks(void) PAYLOAD_CODE;
84
84
extern void install_patches (void ) PAYLOAD_CODE ;
85
85
extern void install_fake_signout_patch (void ) PAYLOAD_CODE ;
86
86
extern void install_syscall_hooks (void ) PAYLOAD_CODE ;
87
- extern int shellcore_fpkg_patch (void ) PAYLOAD_CODE ;
87
+ extern void shellcore_patch (void ) PAYLOAD_CODE ;
88
+
88
89
89
90
#define resolve (name ) name = (void *)(kernbase + name##_addr)
91
+
90
92
PAYLOAD_CODE void resolve_kdlsym ()
91
93
{
92
94
uint64_t kernbase = getkernbase ();
@@ -102,7 +104,7 @@ PAYLOAD_CODE void resolve_kdlsym()
102
104
resolve (SBL_KEYMGR_BUF_VA );
103
105
resolve (SBL_KEYMGR_BUF_GVA );
104
106
resolve (FPU_CTX );
105
- resolve (SYSENT );
107
+ resolve (SYSENT );
106
108
107
109
// common
108
110
resolve (memcmp );
@@ -148,14 +150,14 @@ PAYLOAD_CODE void resolve_kdlsym()
148
150
resolve (vm_map_lookup_entry );
149
151
}
150
152
151
- PAYLOAD_CODE int my_entrypoint ()
153
+ PAYLOAD_CODE void my_entrypoint ()
152
154
{
153
155
resolve_kdlsym ();
154
156
install_fself_hooks ();
155
157
install_fpkg_hooks ();
156
158
install_patches ();
157
- install_syscall_hooks ();
158
- return shellcore_fpkg_patch ();
159
+ install_syscall_hooks ();
160
+ shellcore_patch ();
159
161
}
160
162
161
163
struct {
0 commit comments