mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-05 09:13:43 -04:00
emummc: improve linkscript/building
This commit is contained in:
parent
aa289410bb
commit
1a5801ee0f
7 changed files with 6 additions and 3471 deletions
|
@ -40,7 +40,7 @@ uintptr_t text_base;
|
|||
char inner_heap[INNER_HEAP_SIZE];
|
||||
size_t inner_heap_size = INNER_HEAP_SIZE;
|
||||
extern char _start;
|
||||
extern char __injected_size__;
|
||||
extern char __argdata__;
|
||||
|
||||
// Nintendo Path
|
||||
// TODO
|
||||
|
@ -53,7 +53,7 @@ static char nintendo_path_contents_100[0x100] = "/Nintendo/Contents";
|
|||
static const fs_offsets_t *fs_offsets;
|
||||
|
||||
// Defined by linkerscript
|
||||
#define INJECTED_SIZE ((uintptr_t)&__injected_size__ - (uintptr_t)&_start)
|
||||
#define INJECTED_SIZE ((uintptr_t)&__argdata__ - (uintptr_t)&_start)
|
||||
#define INJECT_OFFSET(type, offset) (type)(text_base + INJECTED_SIZE + offset)
|
||||
|
||||
#define GENERATE_ADD(register, register_target, value) (0x91000000 | value << 10 | register << 5 | register_target)
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -78,7 +78,7 @@ startup:
|
|||
|
||||
MOV W0, #0xFFFF8001
|
||||
ADR X1, __data_start
|
||||
ADR X2, __end__
|
||||
ADR X2, __argdata__
|
||||
SUB X2, X2, X1
|
||||
MOV X3, #3
|
||||
SVC 0x73
|
||||
|
@ -127,5 +127,5 @@ bss_loop:
|
|||
MOV X30, X27
|
||||
|
||||
# FS main
|
||||
ADR X16, __injected_size__
|
||||
ADRP X16, __argdata__
|
||||
BR X16
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue