Mach-O

Mach-O

Infobox file format
name = Mach-O
icon =
extension = none, .o, .dylib
mime =
type code =
uniform type = com.apple.mach-o-binary
owner = Carnegie Mellon University/Apple Inc.
genre = Binary, executable, object, shared libraries, core dump
container for = ARM, SPARC, PA-RISC, PowerPC and x86 executable code, memory image dumps
contained by =
extended from =
extended to =
standard =

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 derivation of the a.out format, Mach-O offered more extensibility and faster access to information in the symbol table.

Mach-O was once used by most systems based on the Mach kernel. NeXTSTEP, Darwin and Mac OS X are examples of systems that have used this format for native executables, libraries and object code. GNU Hurd, which uses GNU Mach as its microkernel, uses ELF, and not Mach-O, as its standard binary format.

Mach-O File Layout

Each Mach-O file is made up of one Mach-O header, followed by a series of load commands, followed by one or more segments, each of which contains between 0 and 255 sections. Mach-O uses the REL relocation format to handle references to symbols. When looking up symbols Mach-O uses a two-level namespace that encodes each symbol into an 'object/symbol name' pair that is then linearly searched for by first the object and then the symbol name.

The basic structure—a list of variable-length "load commands" that reference pages of data elsewhere in the file—was also used in the executable file format for Accent. The Accent file format was in turn, based on an idea from Spice Lisp.

Multiple Mach-O files can be combined in a multi-architecture binary; this allows a single binary file to contain code to support multiple instruction set architectures. For example, a multi-architecture binary for Mac OS X could contain both 32-bit and 64-bit PowerPC code, or could contain both 32-bit PowerPC or x86 code, or could contain 32-bit PowerPC code, 64-bit PowerPC code, 32-bit x86 code, and 64-bit x86 (x86-64) code.

ee also

* Fat binary
* Universal binary
* Apple Intel transition
* Xcode
* Mac OS X users can type man Mach-O in Terminal to see its man page, also available online [http://developer.apple.com/documentation/Darwin/Reference/ManPages/man5/Mach-O.5.html] .

External links

* [http://developer.apple.com/documentation/DeveloperTools/Conceptual/MachORuntime/index.html Mach-O File Format Reference] (Apple Inc.)


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать курсовую

Look at other dictionaries:

  • mach — mach …   Dictionnaire des rimes

  • MACH (E.) — Physicien préoccupé en même temps de la critique historique des concepts physiques et des phénomènes de psychophysiologie des sensations, Mach a fourni une œuvre scientifique importante à la jonction de plusieurs disciplines, mais souvent mal… …   Encyclopédie Universelle

  • Mach — [ mak ] n. pr. • v. 1950; nom d un physicien autrichien ♦ Aéronaut. Nombre de Mach : rapport entre la vitesse d un mobile et celle du son se propageant dans le même milieu. Ellipt Voler à Mach 2, à Mach 3, à 2, 3 fois la vitesse du son (⇒… …   Encyclopédie Universelle

  • Mach — ist der Familienname folgender Personen: Alexander Mach (1902–1980), slowakischer Journalist und Politiker, Hauptorganisator der Deportation slowakischer Juden Edmund Mach (Chemiker) (1846–1901), österreichischer Agrarchemiker und Önologe Edmund… …   Deutsch Wikipedia

  • Mach — may refer to:* Mach number, a measure of speed * Gillette Mach3, a manual razor with three blades * Mach bands, an optical illusion * Muscarinic acetylcholine receptor, abbreviated mACh In computers* ATI Mach, a 2D GPU chip by ATI * Mach II, an… …   Wikipedia

  • Mach 1 —    , MACH NUMBER    When airplanes first started to fly, their speed was measured like that of a moving vehicle on the ground. As air speeds increased, that method became obsolete, and a new method had to be found.    Ernst Mach (1838 1916), an… …   Dictionary of eponyms

  • Mach-O — Icône de terminal, semblable à celle du terminal de MacOS X Extension …   Wikipédia en Français

  • mach — MACH, machi, s.m. (fiz.) Unitate de măsură pentru viteza mişcării fluidelor, utilizată în aerodinamică şi în tehnica rachetelor, egală cu 340 m/s. ♢ Numărul lui Mach = raport între viteza unui proiectil, avion etc. într un fluid şi cea a… …   Dicționar Român

  • Mach-O — Расширение без расширения, .o, .dylib Разработан Университет Карнеги Меллон/Apple Inc. Тип формата двоичный, исполняемый, объектный, динамическая библиотека, дамп памяти Содержит исполняемый код …   Википедия

  • MACH — ist ein Betriebssystem Kernel, der 1985–1994 im Rahmen eines Projekts an der Carnegie Mellon University entwickelt wurde, und gehört zur Klasse der Mikrokernel. Eine aktuelle Inkarnation der Mach Kernel Familie stellt der XNU Kernel dar. Die… …   Deutsch Wikipedia

  • Mach — [mæk US ma:k] n [U] [Date: 1900 2000; Origin: Ernst Mach (1838 1916), Austrian scientist] a unit for measuring speed, especially of an aircraft, in relation to the speed of sound. Mach 1 is the speed of sound, Mach 2 is twice the speed of sound… …   Dictionary of contemporary English

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”