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.
When building for either of i686 and aarch64 Windows with a GNU environment the resulting implib contains incorrect machine code.
The
implibcrate 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 inNot necessary since addends for both of these should be zero (I think).object, in particularIMAGE_REL_ARM64_PAGEBASE_REL21andIMAGE_REL_ARM64_PAGEOFFSET_12Aif we want the full 32-bit range (it may be excessive).If this is not fixed by upstream anytime soon I will attempt to do it myself for ARM64.