Skip to content

Replace binary blob extab(index) with linker-generated sections #107

@riptl

Description

@riptl

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    decompPRs that add decompiled codep-lowquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions