Skip to content

Conversation

@KevinRansom
Copy link
Contributor

Oh my gosh ... this is embarrassing. Please forgive me, or at least beat me gently ...

When I added arm64 and arm native support to the F# compiler, I used the wrong value for MachineType.

it was specified as ARM (CE) for windows CE, rather than ARM.

Anyway, this PR fixes that.

@dsyme
Copy link
Contributor

dsyme commented Aug 30, 2022

Are we in need of a new CI leg?

@KevinRansom
Copy link
Contributor Author

Are we in need of a new CI leg?

I'm afraid arm and ci are not straightforward.

| Some IA64 -> writeInt32AsUInt16 os 0x200 // Machine - IMAGE_FILE_MACHINE_IA64
| Some ARM64 -> writeInt32AsUInt16 os 0xaa64 // Machine - IMAGE_FILE_MACHINE_ARM64
| Some ARM -> writeInt32AsUInt16 os 0x1c0 // Machine - IMAGE_FILE_MACHINE_ARM
| Some ARM -> writeInt32AsUInt16 os 0x1c4 // Machine - IMAGE_FILE_MACHINE_ARM
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really know anything about this, but according to this table this value is called IMAGE_FILE_MACHINE_ARMNT. So maybe update the comment to avoid possible future confusion :)

@KevinRansom KevinRansom merged commit 919d0e7 into dotnet:main Sep 2, 2022
vzarytovskii added a commit to vzarytovskii/fsharp that referenced this pull request Sep 19, 2022
* Fix 13805

* Update src/Compiler/AbstractIL/ilwrite.fs

Co-authored-by: Vlad Zarytovskii <[email protected]>
vzarytovskii added a commit that referenced this pull request Sep 19, 2022
Co-authored-by: Vlad Zarytovskii <[email protected]>
Co-authored-by: Kevin Ransom (msft) <[email protected]>
@KevinRansom KevinRansom deleted the fix13805 branch October 12, 2022 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

F# compilation for linux-arm (Raspberry Pi) results in System.BadImageFormatException.

4 participants