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
Mach-O
(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!
== 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 (computer science)|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, first by the object and then the symbol name.<ref name="file-format-reference">{{cite web|url=https://developer.apple.com/library/mac/documentation/developertools/conceptual/MachORuntime/Reference/reference.html |title=OS X ABI Mach-O File Format Reference |publisher=Apple Inc. |date=2009-02-04 |url-status=dead |archive-url=https://web.archive.org/web/20140904004108/https://developer.apple.com/library/mac/documentation/developertools/conceptual/MachORuntime/Reference/reference.html |archive-date=September 4, 2014}}</ref> The basic structure—a list of variable-length "load commands" that reference pages of data elsewhere in the file<ref>{{cite conference |url=http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.52.675 |title=A Unix Interface for Shared Memory and Memory Mapped Files Under Mach |author1=Avadis Tevanian, Jr. |author2=Richard F. Rashid |author3=Michael W. Young |author4=David B. Golub |author5=Mary R. Thompson |author6=William Bolosky |author7=Richard Sanzi |book-title=Proceedings of the USENIX Summer Conference |location=Phoenix, AZ, USA |publisher=USENIX Association} |date=June 1987 |pages=53–67 }}</ref>—was also used in the executable file format for [[Accent kernel|Accent]].{{citation needed|date=May 2013}} The Accent file format was in turn, based on an idea from [[Spice Lisp]].{{citation needed|date=May 2013}} All multi-byte values in all data structures are written in the byte order of the host for which the code was produced.<ref name="mach-o-ref-data-types">{{cite web |work=OS X ABI Mach-O File Format Reference |title=Data Types |date=2009-02-04 |orig-date=2003 |publisher=[[Apple Inc.]] |url=https://developer.apple.com/library/mac/documentation/developertools/conceptual/MachORuntime/Reference/reference.html#//apple_ref/doc/uid/20001298-BAJFFCGF |url-status=dead |archive-url=https://web.archive.org/web/20140904004108mp_/https://developer.apple.com/library/mac/documentation/developertools/conceptual/MachORuntime/Reference/reference.html#//apple_ref/doc/uid/20001298-BAJFFCGF |archive-date=2014-09-04}}</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)