From 907cc90c4fc5e7796106c5f8bc385610eb446599 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Sat, 23 Sep 2023 07:59:18 -0400 Subject: [PATCH] Fix DOL link issues --- config/SUPP01/config.yml | 1 + config/SUPP01/ldscript.tpl | 25 +++++++++++++++++++++++++ config/SUPP01/splits.txt | 5 +++-- configure.py | 2 +- 4 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 config/SUPP01/ldscript.tpl diff --git a/config/SUPP01/config.yml b/config/SUPP01/config.yml index 6dc8bd6..3cc3e32 100644 --- a/config/SUPP01/config.yml +++ b/config/SUPP01/config.yml @@ -3,6 +3,7 @@ hash: 93b41984897b3f1622dcf56a56d89b56a85bb47f symbols: config/SUPP01/symbols.txt splits: config/SUPP01/splits.txt mw_comment_version: 15 # GC Linker 3.0 +ldscript_template: config/SUPP01/ldscript.tpl modules: - object: orig/SUPP01/rel/boot.rel diff --git a/config/SUPP01/ldscript.tpl b/config/SUPP01/ldscript.tpl new file mode 100644 index 0000000..ece89b9 --- /dev/null +++ b/config/SUPP01/ldscript.tpl @@ -0,0 +1,25 @@ +MEMORY +{ + text : origin = $ORIGIN +} + +SECTIONS +{ + GROUP: + { + $SECTIONS + .stack ALIGN(0x100):{} + } > text + + _stack_end = _f_sbss2 + SIZEOF(.sbss2); + _stack_addr = (_stack_end + 0x10000 + 0x7) & ~0x7; + _db_stack_addr = (_stack_addr + 0x2000); + _db_stack_end = _stack_addr; + __ArenaLo = _db_stack_addr; // Originally (_db_stack_addr + 0x1f) & ~0x1f + __ArenaHi = $ARENAHI; +} + +FORCEACTIVE +{ + $FORCEACTIVE +} diff --git a/config/SUPP01/splits.txt b/config/SUPP01/splits.txt index c3e3ef8..434e7c2 100644 --- a/config/SUPP01/splits.txt +++ b/config/SUPP01/splits.txt @@ -19,6 +19,7 @@ Runtime.PPCEABI.H/global_destructor_chain.c: Runtime.PPCEABI.H/__init_cpp_exceptions.cpp: .text start:0x801C89AC end:0x801C8A1C - .ctors start:0x801DD000 end:0x801DD004 - .dtors start:0x801DD0C0 end:0x801DD0C8 + .ctors start:0x801DD000 end:0x801DD004 rename:.ctors$10 + .dtors start:0x801DD0C0 end:0x801DD0C4 rename:.dtors$10 + .dtors start:0x801DD0C4 end:0x801DD0C8 rename:.dtors$15 .sdata start:0x802F5CF0 end:0x802F5CF8 diff --git a/configure.py b/configure.py index 19a36f1..5d40f3a 100644 --- a/configure.py +++ b/configure.py @@ -143,7 +143,7 @@ LIBS = [] # Tool versions COMPILERS_TAG = "1" -DTK_TAG = "v0.5.2" +DTK_TAG = "v0.5.3" SJISWRAP_TAG = "v1.1.1" WIBO_TAG = "0.5.1"