mirror of
https://github.com/switchbrew/nx-hbloader.git
synced 2025-06-20 21:12:39 +02:00
Added support for exceptions.
This commit is contained in:
parent
2d7e01f938
commit
96af83a70e
@ -9,7 +9,7 @@ const char* g_easterEgg = "Do you mean to tell me that you're thinking seriously
|
||||
static char g_argv[2048];
|
||||
static char g_nextArgv[2048];
|
||||
static char g_nextNroPath[512];
|
||||
static u64 g_nroAddr = 0;
|
||||
u64 g_nroAddr = 0;
|
||||
static u64 g_nroSize = 0;
|
||||
static NroHeader g_nroHeader;
|
||||
static bool g_isApplication = 0;
|
||||
|
@ -4,6 +4,9 @@
|
||||
.type nroEntrypointTrampoline, %function
|
||||
.align 2
|
||||
|
||||
.global __libnx_exception_entry
|
||||
.type __libnx_exception_entry, %function
|
||||
|
||||
.cfi_startproc
|
||||
|
||||
nroEntrypointTrampoline:
|
||||
@ -29,3 +32,21 @@ nroEntrypointTrampoline:
|
||||
b loadNro
|
||||
|
||||
.cfi_endproc
|
||||
|
||||
.section .text.__libnx_exception_entry, "ax", %progbits
|
||||
.align 2
|
||||
|
||||
.cfi_startproc
|
||||
|
||||
__libnx_exception_entry:
|
||||
adrp x7, g_nroAddr
|
||||
ldr x7, [x7, #:lo12:g_nroAddr]
|
||||
cbz x7, __libnx_exception_entry_fail
|
||||
br x7
|
||||
|
||||
__libnx_exception_entry_fail:
|
||||
mov w0, #0xf801
|
||||
bl svcReturnFromException
|
||||
b .
|
||||
|
||||
.cfi_endproc
|
||||
|
Loading…
Reference in New Issue
Block a user