32-align .bss sections

This commit is contained in:
Aetias
2024-02-04 09:19:06 +01:00
parent c81532e36c
commit eab0815fc7
2 changed files with 4 additions and 19 deletions
-19
View File
@@ -143888,25 +143888,6 @@ data_02058dc0: ; 0x02058dc0
.global data_02058e04
data_02058e04: ; 0x02058e04
.byte 0x00, 0x00, 0x00, 0x00
.global data_02058e08
data_02058e08: ; 0x02058e08
.byte 0x00, 0x00, 0x00, 0x00
.global data_02058e0c
data_02058e0c: ; 0x02058e0c
.byte 0x00, 0x00, 0x00, 0x00
.global data_02058e10
data_02058e10: ; 0x02058e10
.byte 0x00, 0x00, 0x00, 0x00
.global data_02058e14
data_02058e14: ; 0x02058e14
.byte 0x00, 0x00, 0x00, 0x00
.global data_02058e18
data_02058e18: ; 0x02058e18
.byte 0x00, 0x00, 0x00, 0x00
.global data_02058e1c
data_02058e1c: ; 0x02058e1c
.byte 0x00, 0x00, 0x00, 0x00
; 0x02058e20
.bss
.global data_02058e20
+4
View File
@@ -269,6 +269,7 @@ with open(f'{BUILD}arm9_linker_script.lcf', 'w') as file:
for obj in ARM9_OBJECTS: file.write(f' {name(obj)}.o(.sinit)\n')
file.write(' . = ALIGN(32);\n')
for obj in ARM9_OBJECTS: file.write(f' {name(obj)}.o(.data)\n')
file.write(' . = ALIGN(32);\n')
file.write(' arm9_bss_start = .;\n')
for obj in ARM9_OBJECTS: file.write(f' {name(obj)}.o(.bss)\n')
for obj in ARM9_OBJECTS: file.write(f' {name(obj)}.o(.sbss)\n')
@@ -283,6 +284,7 @@ with open(f'{BUILD}arm9_linker_script.lcf', 'w') as file:
for obj in ITCM_OBJECTS: file.write(f' {name(obj)}.o(.rodata)\n')
file.write(' itcm_end = .;\n')
file.write(' itcm_size = itcm_end - itcm_start;\n')
file.write(' . = ALIGN(32);\n')
for obj in ITCM_OBJECTS: file.write(f' {name(obj)}.o(.bss)\n')
for obj in ITCM_OBJECTS: file.write(f' {name(obj)}.o(.sbss)\n')
file.write(' } > ITCM\n')
@@ -296,6 +298,7 @@ with open(f'{BUILD}arm9_linker_script.lcf', 'w') as file:
file.write(' . = ALIGN(32);\n')
file.write(' dtcm_end = .;\n')
file.write(' dtcm_aligned_size = dtcm_end - dtcm_start;\n')
file.write(' . = ALIGN(32);\n')
for obj in DTCM_OBJECTS: file.write(f' {name(obj)}.o(.bss)\n')
for obj in DTCM_OBJECTS: file.write(f' {name(obj)}.o(.sbss)\n')
file.write(' } > DTCM\n')
@@ -343,6 +346,7 @@ with open(f'{BUILD}arm9_linker_script.lcf', 'w') as file:
file.write(f' {ov.name}_end = .;\n')
file.write(f' {ov.name}_size = {ov.name}_end - {ov.name}_start;\n')
file.write('\n')
file.write(' . = ALIGN(32);\n')
file.write(f' {ov.name}_bss_start = .;\n')
for obj in ov.objects: file.write(f' {name(obj)}.o(.bss)\n')
for obj in ov.objects: file.write(f' {name(obj)}.o(.sbss)\n')