-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[API Proposal]: Add Arm64 to ProcessorArchitecture and ImageFileMachine enums #58970
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
These enums are effectively deprecated in .NET Core/5+. .NET Core/5+ runs on ARM64 and Wasm just fine without having the respective values in these enums. These enums are not used for anything relevant anymore. I think it would be better to obsolete them instead.
|
Makes sense. Let's not do that then. |
Opened #59061 |
Background and motivation
We now support Arm64 as a target architecture, but not all of the various enums that describe Arm64 PE files have been updated to allow for that support. In particular the System.Reflection.ImageFileMachine enum, and the System.Reflection.ProcessorArchitecture enums are missing arm64 implementation.
API Proposal
API Usage
The impact of a change to ImageFileMachine should be fairly subtle. It effects the behavior of reading an assembly with the System.Reflection.MetadataLoadContext library. Currently, when an Arm64 assembly is loaded, it is given the
ProcessorArchitecture
ofNone
where it should get the new valueArm64
.The above should print
Arm64
instead of failing withIn addition if an assembly is compiled as targetting Arm64, its
AssemblyName
should have aProcessorArchitecture
ofArm64
.Risks
Assembly names are a notoriously complex subject, and changing the processing to report Arm64 instead of None could in theory cause some issues. However, I do not believe that simply adding the new enums is much of a risk, and it does provide the ability for us to fix such issues over time.
The text was updated successfully, but these errors were encountered: