The Format of MPW Object Files

This page documents the format of 68K object (.o) files under the Macintosh Programmer's Workshop. The information here is taken from the manuals that came with MPW 3.0; as far as I know, it is not included with any current MPW documentation.

The standard file type for an MPW object file is "OBJ ", and the creator code is the standard MPW one, "MPS ". The file consists of a sequence of records of various types:

Common Info

Every record begins with a byte containing its type code. This is often followed by a byte of flags--unused flag bits should always be zero. Variable-length records follow this by a word containing the total length of the record in bytes, including the type and flags fields.

An ID is an unsigned 16-bit integer used to refer to a symbolic name. The full name string only appears once, in a dictionary record, which saves space and simplifies other record structures. Valid ID numbers are [1 .. 65534]; IDs 0 and 65535 are reserved. Linker versions prior to MPW 3.0 only allowed IDs in the range [1 .. 16383].

Smart linking means that modules are only included in a link if they're active.

Minimum sizes in bytes for modules may be specified in more than one place: explicitly in Size records, or implicitly in Contents records. If multiple conflicting specifications are given for the size of a module, the largest one is taken.

Record Format Details

Following are descriptions of Pad, First, Last, Comment, Dictionary, Module, Entry Point, Size, Contents, Reference and Computed Reference records.


Last modified 1996 February 5.

Back to the Mac Hacker's Page
Back to LDO's Home Page