Description: The PUBDEF record contains a list of public names. It makes items defined in this object module available to satisfy external references in other modules with which it is bound or linked.

The symbols are also available for export if so indicated in an EXPDEF comment record.

   1 byte  2 bytes
  ÚÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂ---
  ³  91   ³ Record         ³
  ³       ³  Length        ³
  ÀÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁ---

      1 or 2   1 or 2   2 bytes  1 byte <string>  4 bytes    1 or 2   1 byte
   --ÚÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄ¿
     ³Base    ³Base    ³Base    ³Str.  ³Public   ³Public    ³Type    ³Chk sum³
     ³ Group  ³ Segment³ Frame  ³ Len  ³Name str.³ Offset   ³ Index  ³or 0   ³
     ³  Index ³  Index ³  Index ³      ³         ³          ³        ³       ³
   --ÀÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÙ
                        <cnd1>   <------------ repeated ------------>

PUBDEF public names definition record
Base Group, Base Segment and Base Frame

The base group and segment are indices specifying previously defined SEGDEF and GRPDEF records. The group index may be zero, meaning that no group is associated with this PUBDEF record.

The Base Frame field is present only if the Base Segment is zero, but the content of the Base Frame is always ignored by the linker.

The Segment Index is normally nonzero and no Base Frame is present.

The Base Frame is normally used for absolute addressing when the Group and Segment Index are both zero. Absolute addressing is not fully supported in the linker.
Public name, Public Offset and Type Index

The public name string is in <count, char> form and cannot be null. The maximum length of a public name is 255 bytes.

The public offset is a 4 byte numeric field containing the offset of the location referred to by the public name. This offset is assumed to lie within the segment, group or frame specified in the public base field.

The Type Index field is encoded in index format; it contains either debug type information or zero. This field is ignored by the OS/2 2.0 linker.
NOTES:

All defined functions and initialized global variables generate PUBDEF records.

Any PUBDEF records in an object module must appear after the GRPDEF and SEGDEF records to which they refer.

The IBM C Compiler will generate PUBDEF records for all defined functions and initialized global variables. Globals for scalars that are initialized to zero produce COMDEF records.


[Back: 8CH EXTDEF External Names Definition Record]
[Next: 95H LINNUM Line Number Record]