You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The linker is supposed to generate the extab and extabindex sections.
Since we don't have the source code to do that, we used binary blob .s files to recreate them.
This is where the first problem occurs. The linker segfaults when feeding it object files with existing extab / extabindex sections.
As a workaround, the sections were renamed to extab_ / extabindex_.
The second problem is the symbol _eti_init_info.
This is a linker-generated symbol. Trying to reference it when using the extab_ hack instead of actual extab is also going to make the linker crash.
So as another workaround, I've defined _eti_init_info_ with a hardcoded address.
I feel like we should work towards the root problem: Fixing extab and extabindex in the object files with some magic, so that the linker has no problem generating its exception-related symbols and sections.
I'm not sure on this but I think if we don't do this, we're not going to have C++ runtime exception support.
The text was updated successfully, but these errors were encountered:
Really excellent writeup. I think this will be relatively low priority as the game itself makes no use of C++ exceptions--the vast majority of the unwind tables were accidentally generated by the RFL library. Hopefully once we get that split, generating the tables will be relatively simple.
The linker is supposed to generate the
extab
andextabindex
sections.Since we don't have the source code to do that, we used binary blob
.s
files to recreate them.This is where the first problem occurs. The linker segfaults when feeding it object files with existing
extab
/extabindex
sections.As a workaround, the sections were renamed to
extab_
/extabindex_
.The second problem is the symbol
_eti_init_info
.This is a linker-generated symbol. Trying to reference it when using the
extab_
hack instead of actualextab
is also going to make the linker crash.So as another workaround, I've defined
_eti_init_info_
with a hardcoded address.I feel like we should work towards the root problem: Fixing
extab
andextabindex
in the object files with some magic, so that the linker has no problem generating its exception-related symbols and sections.I'm not sure on this but I think if we don't do this, we're not going to have C++ runtime exception support.
The text was updated successfully, but these errors were encountered: