| 73 | } |
| 74 | |
| 75 | static bool registerLibKernel(CSceModuleSystem* pModuleSystem) |
| 76 | { |
| 77 | bool ret = false; |
| 78 | do |
| 79 | { |
| 80 | if (!pModuleSystem) |
| 81 | { |
| 82 | break; |
| 83 | } |
| 84 | |
| 85 | auto& policyManager = pModuleSystem->getPolicyManager(); |
| 86 | |
| 87 | /** |
| 88 | * Defines policy for libkernel. |
| 89 | * |
| 90 | * The default policy for this module is Policy::UseBuitlin, |
| 91 | * which means when a sub-library of libkernel is not defined, |
| 92 | * it applies the Policy::UseBuiltin policy by default. |
| 93 | * |
| 94 | * The libc sub-library uses implementations from builtin modules |
| 95 | * except the symbols listed below. |
| 96 | */ |
| 97 | policyManager.declareModule("libkernel").withDefault(Policy::UseBuiltin) |
| 98 | .declareSubLibrary("libkernel").with(Policy::UseBuiltin).except |
| 99 | ({ |
| 100 | 0x581EBA7AFBBC6EC5, // sceKernelGetCompiledSdkVersion |
| 101 | 0x8E1FBC5E22B82DE1, // sceKernelIsAddressSanitizerEnabled |
| 102 | 0x0F8CA56B7BF1E2D6, // sceKernelError |
| 103 | 0x7FBB8EC58F663355, // __stack_chk_guard |
| 104 | 0x2467D330139D509A, // sceKernelGetFsSandboxRandomWord |
| 105 | 0xDCFB55EA9DD0357E, // scePthreadEqual |
| 106 | }); |
| 107 | |
| 108 | |
| 109 | ret = true; |
| 110 | }while(false); |
| 111 | return ret; |
| 112 | } |
| 113 | |
| 114 | static bool registerOtherModules(CSceModuleSystem *pModuleSystem) |
| 115 | { |
no test coverage detected