Skip to content

i686 Windows is broken #31

@afishhh

Description

@afishhh

When building for either of i686 and aarch64 Windows with a GNU environment the resulting implib contains incorrect machine code.

The implib crate seems to reuse the same code for ARM64 as it uses for ARM which is not correct and immediately SIGILLs (unless your CPU supports whatever the resulting SVE incantation is... see disassembly).
This also appears to be a problem for x86 although I haven't investigated it as thoroughly, a quick look seems to indicate that the machine code it uses there is also different between architectures.

Fixing this for ARM64 may require implementing additional relocation methods in object, in particular IMAGE_REL_ARM64_PAGEBASE_REL21 and IMAGE_REL_ARM64_PAGEOFFSET_12A if we want the full 32-bit range (it may be excessive). Not necessary since addends for both of these should be zero (I think).
If this is not fixed by upstream anytime soon I will attempt to do it myself for ARM64.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions