-
Notifications
You must be signed in to change notification settings - Fork 41
Description
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.