Universal 2 Binary
   HOME

TheInfoList



OR:

The universal binary format is, in Apple parlance, a format for executable files that run natively on either
PowerPC PowerPC (with the backronym Performance Optimization With Enhanced RISC – Performance Computing, sometimes abbreviated as PPC) is a reduced instruction set computer (RISC) instruction set architecture (ISA) created by the 1991 Apple Inc., App ...
or Intel-manufactured IA-32 or Intel 64 or ARM64-based Macintosh computers. The format originated on NeXTStep as " Multi-Architecture Binaries", and the concept is more generally known as a '' fat binary'', as seen on Power Macintosh. With the release of Mac OS X Snow Leopard, and before that, since the move to 64-bit architectures in general, some software publishers such as Mozilla have used the term "universal" to refer to a fat binary that includes builds for both i386 (32-bit Intel) and x86_64 systems. The same mechanism that is used to select between the PowerPC or Intel builds of an application is also used to select between the 32-bit or 64-bit builds of either PowerPC or Intel architectures. Apple, however, continued to require native compatibility with both PowerPC and Intel in order to grant third-party software publishers permission to use Apple's trademarks related to universal binaries. Apple does not specify whether or not such third-party software publishers must (or should) bundle separate builds for all architectures. Universal binaries were introduced into Mac OS at the 2005
Apple Worldwide Developers Conference The Worldwide Developers Conference (WWDC) is an information technology conference held annually by Apple Inc. The conference is usually held at Apple Park in California. The event is usually used to showcase new software and technologies in th ...
as a means to ease the transition from the existing PowerPC architecture to systems based on Intel processors, which began shipping in 2006. Universal binaries typically include both PowerPC and x86 versions of a compiled application. The operating system detects a universal binary by its header, and executes the appropriate section for the architecture in use. This allows the application to run natively on any supported architecture, with no negative performance impact beyond an increase in the storage space taken up by the larger binary. Starting with Mac OS X Snow Leopard, only Intel-based Macs are supported, so software that specifically depends upon capabilities present only in Mac OS X 10.6 or newer will only run on Intel-based Macs and therefore does not require Intel/PPC fat binaries. Additionally, starting with
OS X Lion OS X Lion, also known as Mac OS X Lion, (version 10.7) is the eighth major release of macOS, Apple's desktop and server operating system for Mac computers. A preview of OS X 10.7 Lion was publicly shown at the "Back to the Mac" Apple Speci ...
, only 64-bit Intel Macs are supported, so software that specifically depends on new features in OS X 10.7 or newer will only run on 64-bit processors and therefore does not require 32-bit/64-bit fat binaries. Fat binaries would only be necessary for software that is designed to have backward compatibility with older versions of Mac OS X running on older hardware. The new Universal 2 binary format was introduced at the 2020 Worldwide Developers Conference. Universal 2 allows applications to run on both Intel x86-64-based and ARM64-based Macintosh computers, to enable the transition to Apple silicon.


Motivation

There are two general alternative solutions. The first is to simply provide two separate binaries, one compiled for the x86 architecture and one for the PowerPC architecture. However, this can be confusing to software users unfamiliar with the difference between the two, although the confusion can be remedied through improved documentation, or the use of
hybrid CD A hybrid disc is a disc, such as CD-ROM or Blu-ray, which contains multiple types of data which can be used differently on different devices. These include CD-ROM music albums containing video files viewable on a personal computer, or feature film ...
s. The other alternative is to rely on emulation of one architecture by a system running the other architecture. This approach results in lower performance, and is generally regarded an interim solution to be used only until universal binaries or specifically compiled binaries are available as with Rosetta. Universal binaries are larger than single-platform binaries, because multiple copies of the compiled code must be stored. However, because some non-executable resources are shared by the two architectures, the size of the resulting universal binary can be, and usually is, smaller than the combined sizes of two individual binaries. They also do not require extra RAM because only one of those two copies is loaded for execution.


History

The concept of a universal binary originated with " Multi-Architecture Binaries" in NeXTSTEP, the main architectural foundation of Mac OS X. NeXTSTEP supports universal binaries so that one executable image can run on multiple architectures, including Motorola's m68k, Intel's x86,
Sun Microsystems Sun Microsystems, Inc. (Sun for short) was an American technology company that sold computers, computer components, software, and information technology services and created the Java programming language, the Solaris operating system, ZFS, the ...
's SPARC, and
Hewlett-Packard The Hewlett-Packard Company, commonly shortened to Hewlett-Packard ( ) or HP, was an American multinational information technology company headquartered in Palo Alto, California. HP developed and provided a wide variety of hardware components ...
's PA-RISC. NeXTSTEP and macOS use
Mach-O Mach-O, short for Mach object file format, is a file format for executables, object code, shared libraries, dynamically-loaded code, and core dumps. It was developed to replace the a.out format. Mach-O is used by some systems based on the M ...
archive as the binary format underlying the universal binary. Apple previously used a similar technique during the transition from
68k The Motorola 68000 series (also known as 680x0, m68000, m68k, or 68k) is a family of 32-bit complex instruction set computer (CISC) microprocessors. During the 1980s and early 1990s, they were popular in personal computers and workstations and w ...
processors to PowerPC in the mid-1990s. These dual-platform executables are called
fat binaries A fat binary (or multiarchitecture binary) is a computer executable program or library which has been expanded (or "fattened") with code native to multiple instruction sets which can consequently be run on multiple processor types. This results ...
, referring to their larger file size. Apple's Xcode 2.1 supports the creation of these files, a new feature in that release. A simple application developed with processor-independence in mind might require very few changes to compile as a universal binary, but a complex application designed to take advantage of architecture-specific features might require substantial modification. Applications originally built using other development tools might require additional modification. These reasons have been given for the delay between the introduction of Intel-based Macintosh computers and the availability of third-party applications in universal binary format. Apple's delivery of Intel-based computers several months ahead of their previously announced schedule is another factor in this gap. Apple's Xcode 2.4 takes the concept of universal binaries even further, by allowing four-architecture binaries to be created (32- and 64-bit for both Intel and PowerPC), therefore allowing a single executable to take full advantage of the CPU capabilities of any Mac OS X machine.


Universal applications

Many software developers have provided universal binary updates for their products since the 2005 WWDC. As of December 2008, Apple's website listed more than 7,500 Universal applications. On April 16, 2007,
Adobe Systems Adobe Inc. ( ), originally called Adobe Systems Incorporated, is an American multinational computer software company incorporated in Delaware and headquartered in San Jose, California. It has historically specialized in software for the crea ...
announced the release of
Adobe Creative Suite 3 Adobe Creative Suite (CS) is a discontinued software suite of graphic design, video editing, and web development application software, applications developed by Adobe Systems. The last of the Creative Suite versions, Adobe Creative Suite 6 (CS6) ...
, the first version of the application suite in the Universal Binary format. From 2006 to 2010, many Mac OS X applications were ported to Universal Binary format, including QuarkXPress, Apple's own
Final Cut Studio Final Cut Studio is a discontinued professional video and audio production suite for Mac OS X from Apple Inc., and a direct competitor to Avid Media Composer in the high-end movie production industry. It was developed from 2005 to 2011. Three o ...
, Adobe Creative Suite, Microsoft Office 2008, and
Shockwave Player Adobe Shockwave Player (formerly Macromedia Shockwave Player, and also known as Shockwave for Director) is a discontinued freeware software plug-in for viewing multimedia and video games created on the Adobe Shockwave platform in web pages. Co ...
with version 11 - after that time most were made Intel-only apps. Non-Universal 32-bit PowerPC programs will run on Intel Macs running Mac OS X 10.4, 10.5, and 10.6 (in most cases), but with non-optimal performance, since they must be translated on-the-fly by Rosetta; they will not run on Mac OS X 10.7 Lion and later as Rosetta is no longer part of the OS.


iOS

Apple has used the same binary format as Universal Binaries for iOS applications by default on multiple occasions of architectural co-existence: around 2010 during the armv6-armv7-armv7s transition and around 2016 during the armv7-arm64 transition. The App Store automatically thins the binaries. No trade names were derived for this practice, as it is only a concern of the developer.


Universal 2

On June 22, 2020, Apple announced a two-year permanent transition from Intel x86-64-based processors to ARM64-based Apple silicon beginning with macOS Big Sur in late 2020. To aid in this transition, a new Universal 2 binary was introduced to enable applications to be run on either x86-64-based processors or ARM64-based processors.


Tools

The main tool for handling (creating or splitting) universal binaries is the command found in Xcode. The command on macOS and several other Unix-like systems can identify Mach-O universal binaries and report architecture support. Snow Leopard's
System Profiler {{noref, date=September 2018 A system profiler is a program that can provide detailed information about the software installed and hardware attached to a computer. Typically workstations and personal computers have had system profilers as a commo ...
provides this information on the ''Applications'' tab.


See also

*
Apple–Intel architecture The Apple–Intel architecture, or Mactel, is an unofficial name used for Macintosh personal computers developed and manufactured by Apple Inc. that use Intel x86 processors, rather than the PowerPC and Motorola 68000 ("68k") series processors ...
* Mac transition to Intel processors * Mac transition to Apple silicon * Fat binary * Xslimmer, a commercial Mac OS X application that allows the user to slim down the fat universal binaries by removing the code for the platform that is not in use.


References


External links

* Appl
Developer Transition Resource Center
* Appl
Universal Binary Programming Guidelines
* Appl

{{macOS Executable file formats MacOS