summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorYanis42 <35189056+Yanis42@users.noreply.github.com>2024-04-21 12:23:57 +0200
committerYanis42 <35189056+Yanis42@users.noreply.github.com>2024-04-21 12:23:57 +0200
commitcfbffe5ec1192ba9b9e031995f863f615eb2a98b (patch)
treec42dec9fdeb6ab944399503c032d312188cc4cc3 /tools
parent5da4496e3dc521a7d3f9e831a7ce9c4b1e37c1f6 (diff)
parent72a752995e764c022c8e5fb42ac9ebb6c029d817 (diff)
Merge remote-tracking branch 'upstream/main' into match_actor_rupee
Diffstat (limited to 'tools')
-rw-r--r--tools/lcf.py9
-rw-r--r--tools/mangle.py4
2 files changed, 11 insertions, 2 deletions
diff --git a/tools/lcf.py b/tools/lcf.py
index 9ae89cd0..e0da36bc 100644
--- a/tools/lcf.py
+++ b/tools/lcf.py
@@ -13,6 +13,11 @@ def name(path: str): return path.split("/")[-1]
ARM9_OBJECTS = [
'asm/main/main_02000000.s',
+ 'asm/main/Actor/ActorType.s',
+ 'src/Main/Actor/ActorType.cpp',
+
+ 'asm/main/main_0203e8a0.s',
+
'libs/cpp/src/__register_global_object.c',
'asm/main/main_0204f8f4.s',
@@ -324,6 +329,7 @@ with open(f'{BUILD}arm9_linker_script.lcf', 'w') as file:
for obj in ARM9_OBJECTS: file.write(f' {name(obj)}.o(.sbss)\n')
file.write(' . = ALIGN(32);\n')
file.write(' arm9_bss_end = .;\n')
+ file.write(' . = ALIGN(32);\n')
file.write(' } > ARM9\n')
file.write('\n')
file.write(' .itcm : {\n')
@@ -336,6 +342,7 @@ with open(f'{BUILD}arm9_linker_script.lcf', 'w') as file:
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(' . = ALIGN(32);\n')
file.write(' } > ITCM\n')
file.write('\n')
file.write(' .dtcm : {\n')
@@ -350,6 +357,7 @@ with open(f'{BUILD}arm9_linker_script.lcf', 'w') as file:
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(' . = ALIGN(32);\n')
file.write(' } > DTCM\n')
file.write('\n')
file.write(' .autoloads : {\n')
@@ -402,6 +410,7 @@ with open(f'{BUILD}arm9_linker_script.lcf', 'w') as file:
for obj in ov.objects: file.write(f' {name(obj)}.o(.sbss)\n')
file.write(f' {ov.name}_bss_end = .;\n')
file.write(f' {ov.name}_bss_size = {ov.name}_bss_end - {ov.name}_bss_start;\n')
+ file.write(' . = ALIGN(32);\n')
file.write(' } > ' + ov.name + '\n')
file.write('\n')
file.write(' .arm9_ovt : {\n')
diff --git a/tools/mangle.py b/tools/mangle.py
index fc2c5826..50bf9538 100644
--- a/tools/mangle.py
+++ b/tools/mangle.py
@@ -40,8 +40,8 @@ output = output.decode()
# print(output)
-mangled_funcs: list[str] = re.findall(r'.text +(_Z\S+)', output)
-mangled_data: list[str] = re.findall(r'(?:.data|.bss) +(_Z\S+)', output)
+mangled_funcs: list[str] = re.findall(r'.text +([^\$ ]\S+)', output)
+mangled_data: list[str] = re.findall(r'(?:.data|.bss) +([^\. ]\S+)', output)
if len(mangled_funcs) > 0:
print('Functions:')