Add custom extension to MOD0 header & a few other useful symbols

This commit is contained in:
fincs 2019-04-08 16:36:45 +02:00
parent 31dee5072a
commit a469a68b20
2 changed files with 10 additions and 2 deletions

View File

@ -40,7 +40,7 @@ bssclr_start:
add x1, x1, #7 // round up to 8
bic x1, x1, #7
bss_loop:
bss_loop:
str xzr, [x0], #8
subs x1, x1, #8
bne bss_loop
@ -90,4 +90,9 @@ __nx_mod0:
.word __bss_end__ - __nx_mod0
.word __eh_frame_hdr_start - __nx_mod0
.word __eh_frame_hdr_end - __nx_mod0
.word 0 // "offset to runtime-generated module object" (??)
.word 0 // "offset to runtime-generated module object" (neither needed, used nor supported in homebrew)
// MOD0 extensions for homebrew
.ascii "LNY0"
.word __got_start__ - __nx_mod0
.word __got_end__ - __nx_mod0

View File

@ -14,6 +14,7 @@ SECTIONS
/* =========== CODE section =========== */
PROVIDE(__start__ = 0x0);
. = __start__;
__code_start = . ;
.crt0 :
{
@ -52,6 +53,7 @@ SECTIONS
/* =========== RODATA section =========== */
. = ALIGN(0x1000);
__rodata_start = . ;
.nx-module-name : { KEEP (*(.nx-module-name)) } :rodata
@ -80,6 +82,7 @@ SECTIONS
/* =========== DATA section =========== */
. = ALIGN(0x1000);
__data_start = . ;
.eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } :data
.gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } :data