Mach-O

From Free net encyclopedia

{{Infobox file format | name = Mach-O | icon = Image:ExecutableBinaryIcon.png | extension = none, .o, .dylib | mime = | creatorcode = | owner =Carnegie Mellon University/Apple Computer | genre = Binary, executable, object, shared libraries, core dump | containerfor = PowerPC and x86 executable code, memory image dumps | containedby = | extendedfrom = | extendedto = }} Mach-O, short for Mach object file format, is a file format for executables, object code, shared libraries, dynamically-loaded code, and core dumps. An executable file format specifies the order in which code and data is loaded into memory, as ordering of code and data in the file.

Mach-O was once used by most systems that 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 microkernel, utilizes ELF, and not Mach-O, as its standard binary format. Mac OS X is probably the last system using Mach-O today.

Binaries are divided into segments. Each segment consists of one or more sections.

Mach-O files support more than one type of machine code in the file. Apple uses this feature to create Universal Binaries, which are applications (executable files), dylibs (dynamically-linked shared libraries), or Mach-O bundles (code dynamically loaded at run time) with PowerPC and x86 executable code in the same executable file, usable on both IBM/Motorola & Intel based Macintoshes.

See also

External links