Fat Binary on Windows?

2.2k Views Asked by At

I know that on Mac OS X, you can combine multiple binaries that target different architectures into a single binary using lipo. I am wondering if there is a similar solution on the Windows side. Thank you.

3

There are 3 best solutions below

3
On BEST ANSWER

Unfortunately all the Windows architectures use the same structures in the PE header, so no. It is possible to fuse a Windows executable and a DOS executable though, since DOS uses the MZ header instead.

5
On

I think you are reffering to the ADS, that has been added to the NTFS to provide similar functionality as on Mac. Although NTFS supports multiple streams, the PE loader should choose the right one, and I'm not sure if it's implemented.

0
On

There's a real fat PE format in Windows 11 on ARM called Arm64X which contains both Arm64 code and Arm64EC code

Fundamentally, an Arm64X binary contains all of the content that would be in separate x64/Arm64EC and Arm64 binaries, but merged into one more efficient file on disk. The built Arm64X binary has two sets of code, entry points, etc., while eliminating redundant parts to save space on disk.

How do Arm64X binaries work?

Arm64EC is a completely new ABI that's incompatible with ARM64, designed for mixing x86-64 and ARM64 code