Homebrew ABI: Difference between revisions
No edit summary |
|||
Line 2: | Line 2: | ||
=== Entrypoint === | === Entrypoint === | ||
Entrypoint is at binary_ptr+0. At this offset, there is a branch instruction that jumps past the NRO0 header. This is for file format polyglot compatibility with NSO0. | Entrypoint is at binary_ptr+0. At this offset, there is a branch instruction that jumps past the NRO0 header. This is for (.text) file format polyglot compatibility with NSO0. | ||
Every application should clean itself up before returning to loader. | Every application should clean itself up before returning to loader. | ||
Line 56: | Line 56: | ||
* 6: [[#SyscallAvailableHint]] | * 6: [[#SyscallAvailableHint]] | ||
* 7: [[#AppletType]] [MANDATORY] | |||
==== EndOfList ==== | ==== EndOfList ==== | ||
Line 125: | Line 127: | ||
* '''Value[1]:''' Same as above. | * '''Value[1]:''' Same as above. | ||
* '''DefaultBehavior:''' If NSO0, assume kernelhax thus all rare syscalls are allowed. If NRO0, assume all rare syscalls are inaccessible. | * '''DefaultBehavior:''' If NSO0, assume kernelhax thus all rare syscalls are allowed. If NRO0, assume all rare syscalls are inaccessible. | ||
==== AppletType ==== | |||
Specifies the [[AM_services|AM]] AppletType, used for selecting which Open*Proxy command to use. | |||
* '''Key:''' 7 | |||
* '''IsMandatory:''' True | |||
* '''Value[0]:''' AppletType | |||
* '''Value[1]:''' Ignored. | |||
enum LoaderConfigAppletType { | |||
LoaderConfigAppletType_Application = 0, | |||
LoaderConfigAppletType_SystemApplet = 1, | |||
LoaderConfigAppletType_LibraryApplet = 2, | |||
LoaderConfigAppletType_OverlayApplet = 3, | |||
LoaderConfigAppletType_SystemApplication = 4, | |||
}; |