首页 windows常见问题系列8:arm64ec与原生有什么区别
文章
取消

windows常见问题系列8:arm64ec与原生有什么区别

win11使用全新的模拟器Prism模拟运行x86和x64应用,但win10只能模型x86

x64应用的系统库会编译成arm64x pe文件,可以被x64或arm64进程加载

arm64ec

Arm64EC (“Emulation Compatible”)

Arm64EC is a new application binary interface (ABI),只在win11上才有

arm64ec 与x64 代码可以互操作(包括链接),但不能与arm64互操作。

但x64与arm64可以被arm64x pe加载,应该是arm64x pe里面包含了2份,一份是x64(arm64ec),一份是arm64

所以前期可以先将x64编译成arm64ec,来提升部分性能

检测类型:link /dump /headers

会输出

1
2
3
File Type: EXECUTABLE IMAGE
FILE HEADER VALUES
    8664 machine (x64) (ARM64X)

The combination of (x64) and (ARM64X) indicates that some portion of the binary has been recompiled as Arm64EC,

A binary with a machine header that contains (ARM64) and (ARM64X) is an Arm64X PE file that can be loaded into both x64 and Arm64 apps.

Arm64X is a new type of binary that can contain both the classic Arm64 code and Arm64EC code together.

x64和arm64应用可以加载arm64x pe库

如何编译arm64x pe库,比较麻烦!

在arm64ec属性页面有一个Build Projet as ARM64X选项。除了arm64ec配置外,还必须有一个Arm64的配置

本文由作者按照 CC BY 4.0 进行授权