mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
Fixes for 1.0.0, correcting NRO aslr base
This commit is contained in:
parent
4f8dfc52c6
commit
146aad7f55
@ -2,18 +2,19 @@
|
||||
.global _start
|
||||
|
||||
_start:
|
||||
bl startup
|
||||
b startup
|
||||
.word 0
|
||||
.ascii "HOMEBREW"
|
||||
|
||||
.org _start+0x80
|
||||
startup:
|
||||
// get aslr base
|
||||
bl +4
|
||||
sub x28, x30, #0x84
|
||||
|
||||
// save main thread handle
|
||||
mov x27, x1
|
||||
|
||||
// get aslr base
|
||||
sub x28, x30, #4
|
||||
|
||||
// clear .bss
|
||||
adrp x0, __bss_start__
|
||||
adrp x1, __bss_end__
|
||||
|
@ -107,6 +107,11 @@ SVC_BEGIN svcWaitSynchronization
|
||||
ret
|
||||
SVC_END
|
||||
|
||||
SVC_BEGIN svcCancelSynchronization
|
||||
svc 0x19
|
||||
ret
|
||||
SVC_END
|
||||
|
||||
SVC_BEGIN svcArbitrateLock
|
||||
svc 0x1a
|
||||
ret
|
||||
|
@ -233,7 +233,8 @@ static Result appletSetFocusHandlingMode(u32 mode) {
|
||||
|
||||
rc = _appletSetFocusHandlingMode(invals[0], invals[1], invals[2]);
|
||||
|
||||
if (R_SUCCEEDED(rc)) rc = _appletSetOutOfFocusSuspendingEnabled(invals[3]);
|
||||
if (R_SUCCEEDED(rc) && kernelAbove200())
|
||||
rc = _appletSetOutOfFocusSuspendingEnabled(invals[3]);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user