Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Fat binary
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===NeXT's/Apple's multi-architecture binaries=== ====NeXTSTEP Multi-Architecture Binaries==== Fat binaries were a feature of [[NeXT]]'s [[NeXTSTEP]]/[[OPENSTEP]] operating system, starting with NeXTSTEP 3.1. In NeXTSTEP, they were called "Multi-Architecture Binaries". Multi-Architecture Binaries were originally intended to allow software to be compiled to run both on NeXT's Motorola 68k-based hardware and on Intel [[IA-32]]-based [[IBM PC compatible|PC]]s running NeXTSTEP, with a single binary file for both platforms.<ref name="Tevanian-DeMoney-Enderby_Wiebe_Snyder_1995"/> It was later used to allow OPENSTEP applications to run on PCs and the various [[RISC]] platforms OPENSTEP supported. Multi-Architecture Binary files are in a special archive format, in which a single file stores one or more [[Mach-O]] subfiles for each architecture supported by the Multi-Architecture Binary. Every Multi-Architecture Binary starts with a structure ({{code|struct fat_header}}) containing two unsigned integers. The first integer ("magic") is used as a [[File format#Magic number|magic number]] to identify this file as a Fat Binary. The second integer ({{mono|nfat_arch}}) defines how many Mach-O Files the archive contains (how many instances of the same program for different architectures). After this header, there are ''{{mono|nfat_arch}}'' number of fat_arch structures ({{code|struct fat_arch}}). This structure defines the offset (from the start of the file) at which to find the file, the alignment, the size and the CPU type and subtype which the Mach-O binary (within the archive) is targeted at. The version of the [[GNU Compiler Collection]] shipped with the Developer Tools was able to [[cross-compilation|cross-compile]] source code for the different architectures on which [[NeXTStep]] was able to run. For example, it was possible to choose the target architectures with multiple '-arch' options (with the architecture as argument). This was a convenient way to distribute a program for NeXTStep running on different architectures. It was also possible to create libraries (e.g. using NeXTStep's {{mono|libtool}}) with different targeted object files. ====Mach-O and Mac OS X==== Apple Computer acquired NeXT in 1996 and continued to work with the OPENSTEP code. Mach-O became the native object file format in Apple's free [[Darwin (operating system)|Darwin operating system]] (2000) and Apple's [[Mac OS X]] (2001), and NeXT's Multi-Architecture Binaries continued to be supported by the operating system. Under Mac OS X, Multi-Architecture Binaries can be used to support multiple variants of an architecture, for instance to have different versions of [[32-bit]] code optimized for the [[PowerPC G3]], [[PowerPC G4]], and [[PowerPC 970]] generations of processors. It can also be used to support multiple architectures, such as 32-bit and [[64-bit]] PowerPC, or PowerPC and [[x86]], or [[x86-64]] and [[AArch64|ARM64]].<ref name="Universal Binary"/> ===={{anchor|Thin binary}}Apple's Universal binary==== {{Main|Universal binary}} [[File:Apple-Universal-binary-logo.png|thumb|Apple ''Universal binary'' logo]] In 2005, Apple announced another [[Mac transition to Intel processors|transition, from PowerPC processors to Intel x86 processors]]. Apple promoted the distribution of new applications that support both PowerPC and x86 natively by using executable files in Multi-Architecture Binary format.<ref name="Singh_2006"/> Apple calls such programs "[[Universal application]]s" and calls the file format "[[Universal binary]]" as perhaps a way to distinguish this new transition from the previous transition, or other uses of Multi-Architecture Binary format. Universal binary format was not necessary for forward migration of pre-existing native PowerPC applications; from 2006 to 2011, Apple supplied [[Rosetta (software)|Rosetta]], a PowerPC (PPC)-to-x86 [[dynamic binary translation|dynamic binary translator]], to play this role. However, Rosetta had a fairly steep performance overhead, so developers were encouraged to offer both PPC and Intel binaries, using Universal binaries. The obvious cost of Universal binary is that every installed executable file is larger, but in the years since the release of the PPC, hard-drive space has greatly outstripped executable size; while a Universal binary might be double the size of a single-platform version of the same application, free-space resources generally dwarf the code size, which becomes a minor issue. In fact, often a Universal-binary application will be smaller than two single-architecture applications because program resources can be shared rather than duplicated. If not all of the architectures are required, the {{mono|lipo}} and {{mono|ditto}} command-line applications can be used to remove versions from the Multi-Architecture Binary image, thereby creating what is sometimes called a ''thin binary''. In addition, Multi-Architecture Binary executables can contain code for both 32-bit and 64-bit versions of PowerPC and x86, allowing applications to be shipped in a form that supports 32-bit processors but that makes use of the larger address space and wider data paths when run on 64-bit processors. In versions of the [[Xcode]] development environment from 2.1 through 3.2 (running on [[Mac OS X 10.4]] through [[Mac OS X 10.6]]), Apple included utilities which allowed applications to be targeted for both Intel and PowerPC architecture; universal binaries could eventually contain up to four versions of the executable code (32-bit PowerPC, 32-bit x86, 64-bit PowerPC, and [[X86-64|64-bit x86]]). However, PowerPC support was removed from Xcode 4.0 and is therefore not available to developers running [[Mac OS X 10.7]] or greater. In 2020, Apple announced another [[Mac transition to Apple silicon|transition]], this time from Intel x86 processors to [[Apple silicon]] (ARM64 architecture). To smooth the transition Apple added support for the [[Universal 2 binary]] format; Universal 2 binary files are Multi-Architecture Binary files containing both x86-64 and ARM64 executable code, allowing the binary to run natively on both 64-bit Intel and 64-bit Apple silicon. Additionally, Apple introduced [[Rosetta 2]] dynamic binary translation for x86 to Arm64 instruction set to allow users to run applications that do not have Universal binary variants. ==== {{Anchor|Fat EFI binary}}Apple Fat EFI binary ==== In 2006, Apple switched from [[PowerPC]] to [[Intel]] CPUs, and replaced [[Open Firmware]] with [[Extensible Firmware Interface|EFI]]. However, by 2008, some of their Macs used 32-bit EFI and some used 64-bit EFI. For this reason, Apple extended the EFI specification with "fat" binaries that contained both 32-bit and 64-bit EFI binaries.<ref>{{Cite web |title=rEFIt - EFI Fat Binaries |url=https://refit.sourceforge.net/info/fat_binary.html |access-date=2022-10-18 |website=refit.sourceforge.net}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)