summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Miller <seanmiller999@gmail.com>2026-04-07 16:49:03 +0100
committerSean Miller <seanmiller999@gmail.com>2026-04-07 16:49:03 +0100
commit21c847dfd63f557d7d617182148a52198f2466ef (patch)
tree3f0f26e1955e1a04ef344865f91cee698937dee5
parent917f8508248fa793ae3ac8ffd5338e5d6275a190 (diff)
Fix link error with d_lib.cpp & mark as matching
-rw-r--r--config/SOUE01/symbols.txt6
-rw-r--r--configure.py2
-rw-r--r--include/toBeSorted/d_lib.h15
-rw-r--r--src/d/d_main.cpp2
-rw-r--r--src/toBeSorted/d_lib.cpp7
5 files changed, 22 insertions, 10 deletions
diff --git a/config/SOUE01/symbols.txt b/config/SOUE01/symbols.txt
index bfe0bb47..6c0a8333 100644
--- a/config/SOUE01/symbols.txt
+++ b/config/SOUE01/symbols.txt
@@ -135,7 +135,7 @@ _bss_init_info = .init:0x800066FC; // type:object size:0x20 scope:global data:4b
@eti_80006BD8 = extabindex:0x80006BD8; // type:object size:0xC scope:local hidden
@eti_80006BE4 = extabindex:0x80006BE4; // type:object size:0xC scope:local hidden
_eti_init_info = extabindex:0x80006BF0; // type:object size:0x20 scope:global
-unknownStub__4dLibFv = .text:0x80006C20; // type:function size:0x4
+unknownStub = .text:0x80006C20; // type:function size:0x4
strequals = .text:0x80006C30; // type:function size:0x90
findSMA2 = .text:0x80006CC0; // type:function size:0x10
findSMA3 = .text:0x80006CD0; // type:function size:0x10
@@ -39716,7 +39716,7 @@ jumptable_805713B0 = .data:0x805713B0; // type:object size:0x1C scope:local
jumptable_805713CC = .data:0x805713CC; // type:object size:0x1C scope:local
@stringBase0 = .data:0x805713E8; // type:object size:0x30 scope:local data:string_table
gTRKExceptionStatus = .data:0x80571418; // type:object size:0x10 scope:local data:4byte
-@811 = .sdata:0x80571440; // type:object size:0x8
+@813 = .sdata:0x80571440; // type:object size:0x8
@813 = .sdata:0x80571448; // type:object size:0x8 data:string
@5820 = .sdata:0x80571450; // type:object size:0x3 scope:local data:string
@5822 = .sdata:0x80571454; // type:object size:0x4 scope:local data:string
@@ -44980,7 +44980,7 @@ lbl_805779E0 = .sdata2:0x805779E0; // type:object size:0x4 align:4 data:float
@808 = .sdata2:0x80579118; // type:object size:0x8 scope:local data:string
@809 = .sdata2:0x80579120; // type:object size:0x8 scope:local data:string
@810 = .sdata2:0x80579128; // type:object size:0x8 scope:local data:string
-@811 = .sdata2:0x80579130; // type:object size:0x8 scope:local data:string
+@813 = .sdata2:0x80579130; // type:object size:0x8 scope:local data:string
@812 = .sdata2:0x80579138; // type:object size:0x8 scope:local data:string
@813 = .sdata2:0x80579140; // type:object size:0x7 scope:local data:string
@814 = .sdata2:0x80579148; // type:object size:0x7 scope:local data:string
diff --git a/configure.py b/configure.py
index 502ba67c..efa70f35 100644
--- a/configure.py
+++ b/configure.py
@@ -410,7 +410,7 @@ config.libs = [
"scratch_preset_id": 169,
"progress_category": "game",
"objects": [
- Object(NonMatching, "toBeSorted/d_lib.cpp"),
+ Object(Matching, "toBeSorted/d_lib.cpp"),
Object(NonMatching, "toBeSorted/unk_sorajima_list.cpp"),
Object(Matching, "toBeSorted/mpls.cpp"),
Object(NonMatching, "toBeSorted/mdl_base.cpp"),
diff --git a/include/toBeSorted/d_lib.h b/include/toBeSorted/d_lib.h
index b9f7c26d..d60dee78 100644
--- a/include/toBeSorted/d_lib.h
+++ b/include/toBeSorted/d_lib.h
@@ -1,11 +1,20 @@
#ifndef D_LIB_H
#define D_LIB_H
-namespace dLib {
+#include "common.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern u32 lbl_80574FA0;
+extern u32 lbl_80574FA4;
void unknownStub();
-bool strequals(const char *str1, const char *str2);
+bool strequals(const char *lhs, const char *rhs);
-}; // namespace dLib
+#ifdef __cplusplus
+}
+#endif
#endif // D_LIB_H
diff --git a/src/d/d_main.cpp b/src/d/d_main.cpp
index 91d88f42..58a24e61 100644
--- a/src/d/d_main.cpp
+++ b/src/d/d_main.cpp
@@ -58,7 +58,7 @@ static OSThread MAIN_THREAD;
void main(int argc, char **argv) {
u8 pStackBase[STACK_SIZE] __attribute__((aligned(32)));
- dLib::unknownStub();
+ unknownStub();
dMain::g_InitialTime = OSGetTime();
dSystem::fixHeaps();
diff --git a/src/toBeSorted/d_lib.cpp b/src/toBeSorted/d_lib.cpp
index 9c374a13..d8111ce4 100644
--- a/src/toBeSorted/d_lib.cpp
+++ b/src/toBeSorted/d_lib.cpp
@@ -2,9 +2,12 @@
#include <cstring>
-void dLib::unknownStub() {}
+u32 lbl_80574FA0;
+u32 lbl_80574FA4;
-bool dLib::strequals(const char *lhs, const char *rhs) {
+void unknownStub() {}
+
+bool strequals(const char *lhs, const char *rhs) {
if (!rhs) {
return false;
}