Universal binary
Encyclopedia
A universal binary is, in Apple parlance, an executable file or application
Application software
Application software, also known as an application or an "app", is computer software designed to help the user to perform specific tasks. Examples include enterprise software, accounting software, office suites, graphics software and media players. Many application programs deal principally with...

 bundle
Bundle (NEXTSTEP)
In NEXTSTEP, OPENSTEP, their lineal descendants Mac OS X, iOS, and in GNUstep, a bundle is a directory that allows related resources such as an application's executable and its graphics to be grouped together, appearing as a single file to the user....

 that runs natively on either PowerPC
PowerPC
PowerPC is a RISC architecture created by the 1991 Apple–IBM–Motorola alliance, known as AIM...

 or Intel-manufactured IA-32
IA-32
IA-32 , also known as x86-32, i386 or x86, is the CISC instruction-set architecture of Intel's most commercially successful microprocessors, and was first implemented in the Intel 80386 as a 32-bit extension of x86 architecture...

 or Intel 64-based Macintosh computers; it is an implementation of the concept more generally known as a fat binary
Fat binary
A fat binary is a computer program with code native to multiple Instruction sets which can consequently be run on multiple processor types. The usual method of implementation is to include a version of the machine code for each instruction set, preceded by code compatible with all operating...

.

With the release of Mac OS X Snow Leopard
Snow Leopard
The snow leopard is a moderately large cat native to the mountain ranges of South Asia and Central Asia...

, 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 tailored builds for both i386 (32-bit Intel) and x86_64 systems. The same mechanism which is used to select between the custom 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, continues 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. At the same time, Apple does not specify whether or not such third-party software publishers must (or should) bundle separate builds for both the 32-bit and 64-bit variants of either architecture.

The universal binary format was introduced at the 2005 Apple Worldwide Developers Conference 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
PowerPC
PowerPC is a RISC architecture created by the 1991 Apple–IBM–Motorola alliance, known as AIM...

 and x86
X86 architecture
The term x86 refers to a family of instruction set architectures based on the Intel 8086 CPU. The 8086 was launched in 1978 as a fully 16-bit extension of Intel's 8-bit based 8080 microprocessor and also introduced segmentation to overcome the 16-bit addressing barrier of such designs...

 versions of a compiled application. The operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer 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 OS X 10.6 or newer no longer require Intel/PPC fat binaries. Additionally, starting with Mac OS X Lion, only 64-bit Intel Macs are supported; therefore, software that specifically depends on new features in Mac OS X 10.7 or newer no longer require 32-bit/64-bit fat binaries. Presently, fat binaries would only be necessary for software that is designed to have backward compatibility
Backward compatibility
In the context of telecommunications and computing, a device or technology is said to be backward or downward compatible if it can work with input generated by an older device...

 with older versions of Mac OS X running on older hardware.

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
Hybrid CD
A Hybrid disc is a CD-ROM with additional types of data stored on it.It may contain:* Multiple file systems such as for both Microsoft Windows and Apple Macintosh based operating systems.* Additional security measures* Audio CD with added data tracks...

s. The other alternative is to rely on emulation
Emulator
In computing, an emulator is hardware or software or both that duplicates the functions of a first computer system in a different second computer system, so that the behavior of the second system closely resembles the behavior of the first system...

 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 (see Rosetta
Rosetta (software)
Rosetta was a lightweight and dynamic binary translator for Mac OS X which Apple released in 2006 when it transitioned the Macintosh from PowerPC to Intel processors. It allowed pre-existing software to run on the new systems without modification....

).

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 both binaries combined. They also do not require extra RAM because only one of those two copies is loaded for execution.

History

Apple previously used a similar technique during the transition from 68k
68k
The Motorola 680x0/m68000/68000 is a family of 32-bit CISC microprocessors. During the 1980s and early 1990s, they were popular in personal computers and workstations and were the primary competitors of Intel's x86 microprocessors...

 processors to PowerPC in the mid-1990s. These dual-platform executables were called fat binaries
Fat binary
A fat binary is a computer program with code native to multiple Instruction sets which can consequently be run on multiple processor types. The usual method of implementation is to include a version of the machine code for each instruction set, preceded by code compatible with all operating...

, referring to their larger file size.

NEXTSTEP
NEXTSTEP
NeXTSTEP was the object-oriented, multitasking operating system developed by NeXT Computer to run on its range of proprietary workstation computers, such as the NeXTcube...

, another predecessor of Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

, supported the fat binary so that one application bundle could be run on multiple architectures, including Intel's x86, Sun Microsystems
Sun Microsystems
Sun Microsystems, Inc. was a company that sold :computers, computer components, :computer software, and :information technology services. Sun was founded on February 24, 1982...

' SPARC
SPARC
SPARC is a RISC instruction set architecture developed by Sun Microsystems and introduced in mid-1987....

 and Hewlett-Packard
Hewlett-Packard
Hewlett-Packard Company or HP is an American multinational information technology corporation headquartered in Palo Alto, California, USA that provides products, technologies, softwares, solutions and services to consumers, small- and medium-sized businesses and large enterprises, including...

's PA-RISC
PA-RISC
PA-RISC is an instruction set architecture developed by Hewlett-Packard. As the name implies, it is a reduced instruction set computer architecture, where the PA stands for Precision Architecture...

. The binary format underlying the universal binary, a Mach-O
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. A replacement for the a.out format, Mach-O offered more extensibility and faster access to information in the symbol table.Mach-O was once used by...

 archive, is the same format used for the fat binary in NEXTSTEP.

Apple's Xcode
Xcode
Xcode is a suite of tools, developed by Apple, for developing software for Mac OS X and iOS. Xcode 4.2, the latest major version, is available on the Mac App Store for free for Mac OS X 10.7 , and on the Apple Developer Connection website for free to registered developers Xcode is a suite of tools,...

 2.1 supports the creation of these files, a new feature in that release. A simple application developed with processor-independence
Porting
In computer science, porting is the process of adapting software so that an executable program can be created for a computing environment that is different from the one for which it was originally designed...

 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
Xcode
Xcode is a suite of tools, developed by Apple, for developing software for Mac OS X and iOS. Xcode 4.2, the latest major version, is available on the Mac App Store for free for Mac OS X 10.7 , and on the Apple Developer Connection website for free to registered developers Xcode is a suite of tools,...

 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
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

 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 now lists more than 7,500 Universal applications.

On April 16, 2007, Adobe announced the release of Adobe Creative Suite 3
Adobe Creative Suite
Adobe Creative Suite is a collection of graphic design, video editing, and web development applications made by Adobe Systems. The collection consists of Adobe's applications , that are based on various technologies...

, the first version of the application suite in a Universal Binary format.

As of March 2008, many applications for Mac OS X have been ported to Universal binary, including QuarkXPress
QuarkXPress
QuarkXPress is a computer application for creating and editing complex page layouts in a WYSIWYG environment. It runs on Mac OS X and Windows. It was first released by Quark, Inc...

, Apple's own Final Cut Studio
Final Cut Studio
Final Cut Studio is a 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...

, Adobe Creative Suite
Adobe Creative Suite
Adobe Creative Suite is a collection of graphic design, video editing, and web development applications made by Adobe Systems. The collection consists of Adobe's applications , that are based on various technologies...

, Microsoft Office 2008, and Shockwave Player beginning with version 11. Non-Universal products will run on Intel Macs (in most cases), but with non-optimal performance, since they must be translated on-the-fly by Rosetta
Rosetta (software)
Rosetta was a lightweight and dynamic binary translator for Mac OS X which Apple released in 2006 when it transitioned the Macintosh from PowerPC to Intel processors. It allowed pre-existing software to run on the new systems without modification....

. Non-Universal PowerPC Applications will not run on Mac OS X 10.7 Lion as Rosetta is no longer part of the OS.

Identifying universal binaries

The Unix "file" command (on OS X and Linux) can identify Mac OS X binaries and report which architecture(s) they support.

Snow Leopard's System Profiler
System profiler
A system profiler is a program that can provide detailed information about the software installed and hardware attached to the computer. Typically workstations and personal computers have had system profilers as a common feature since the mid-1990s....

 provides this information on the Applications tab.

See also

  • Apple–Intel architecture
  • Apple–Intel transition
  • Fat binary
    Fat binary
    A fat binary is a computer program with code native to multiple Instruction sets which can consequently be run on multiple processor types. The usual method of implementation is to include a version of the machine code for each instruction set, preceded by code compatible with all operating...

  • Xslimmer
    Xslimmer
    Xslimmer is an application for Apple's Mac OS X developed by LateNiteSoft.The software is a utility to tweak universal binaries by stripping the binary from either its PowerPC or Intel code . This recovers hard disk space. Purportedly, the recovered space is significant...

    , 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's not in use.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK