Skip to content

Match G2MEAB Runtime exception support - #61

Merged
henriquegemignani merged 10 commits into
mainfrom
sol/runtime-layout-20261124
Nov 25, 2026
Merged

henriquegemignani merged 10 commits into
mainfrom
sol/runtime-layout-20261124

Conversation

@encounter

@encounter encounter commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Companion prototype split changes and DOL verification in corruption-proto #1360.

Comment thread sdk_configure.py Outdated
sdk_dir: str = "extern/sdk",
non_matching: bool = False,
prototype: bool = False,
prototype_split_objects: bool = False,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry just no about this. stop with the hacks

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the SDK switch and the game-side argument. The paired build links NMWException, errno, and PadFallback from source and reproduces the original G2MEAB DOL. Prototype #1360

@encounter
encounter added this pull request to stack #65 November 25, 2026 13:49
Comment thread src/Runtime/New.cp Outdated
virtual ~exception() throw();
virtual const char* what() const throw();
};
#ifdef RVL_PROTO_RUNTIME

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is keeping these declarations conditional necessary? aren't they removed by linker by being unused?

Comment thread src/Runtime/wprintf.c Outdated
@@ -42,350 +42,529 @@ typedef struct {
} __wOutStrCtrl;

// Guessed name

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't leave random junk behind

Comment thread src/Runtime/New.cp Outdated
};
} // namespace std

#ifdef RVL_PROTO_RUNTIME

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You removed the other ifdef but kept this one. The question applied to all of them.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed all three RVL_PROTO_RUNTIME guards in New.cp at 9f548ab. The linker does discard the unused allocator functions. With string pooling enabled, the live std::exception::what() also retained the unused bad_alloc strings and throw descriptor, changing the Echoes DOL. New.cp now uses -str nopool in the Dolphin SDK configuration, as it already does in G2MEAB.

All seven tested Echoes builds reproduce their original hashes, including the three that link New.o from source. Both prototype companion builds reproduce the original DOL and preserve all 1,247 compiled objects and their link inputs. Prototype #1360 · Prototype #1449

@henriquegemignani
henriquegemignani merged commit 9e57c6a into main Nov 25, 2026
18 of 19 checks passed
@henriquegemignani
henriquegemignani deleted the sol/runtime-layout-20261124 branch November 25, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants