Export ARM9 program footer in LCF

This commit is contained in:
Aetias
2023-10-15 11:33:07 +02:00
parent 1f9f66c2d8
commit 46418dc2d4
2 changed files with 31 additions and 32 deletions
+7
View File
@@ -224,6 +224,7 @@ with open(f'{BUILD}arm9_linker_script.lcf', 'w') as file:
file.write(' ITCM : ORIGIN = 0x1ff8000 >> arm9.bin\n')
file.write(' DTCM : ORIGIN = 0x27e0000 >> arm9.bin\n')
file.write(' AUTOLOADS : ORIGIN = 0 >> arm9.bin\n')
file.write(' FOOTER : ORIGIN = 0 > arm9_footer.bin\n')
file.write('\n')
file.write(' OV_TABLE : ORIGIN = 0 > arm9_ovt.bin\n')
file.write('\n')
@@ -272,6 +273,12 @@ with open(f'{BUILD}arm9_linker_script.lcf', 'w') as file:
file.write(' WRITEW ADDR(DTCM); WRITEW dtcm_size; WRITEW 0xec0;\n')
file.write(' } > AUTOLOADS\n')
file.write('\n')
file.write(' .footer : {\n')
file.write(' WRITEW 0xdec00621;\n')
file.write(' WRITEW spAutoloadBlockInfosStart - ADDR(ARM9);\n')
file.write(' WRITEW 0;\n')
file.write(' } > FOOTER\n')
file.write('\n')
for ov in OVERLAYS:
file.write(f' .{ov.name} : ' + '{\n')
file.write(f' {ov.name}_start = .;\n')