The OpenD Programming Language

SEG_PAGEZERO

The names of segments and sections in them are mostly meaningless to the link-editor. But there are few things to support traditional UNIX executables that require the link-editor and assembler to use some names agreed upon by convention.

The initial protection of the "__TEXT" segment has write protection turned off (not writeable).

The link-editor will allocate common symbols at the end of the "__common" section in the "__DATA" segment. It will create the section and segment if needed.

The currently known segment names and the section names in those segments.

Values

ValueMeaning
SEG_PAGEZERO

The pagezero segment which has no protections and catches NULL references for MH_EXECUTE files.

SEG_TEXT

The tradition UNIX text segment.

SECT_TEXT

The real text part of the text section no headers, and no padding.

SECT_FVMLIB_INIT0

The fvmlib initialization section.

SECT_FVMLIB_INIT1

The section following the fvmlib initialization section.

SEG_DATA

The tradition UNIX data segment.

SECT_DATA

The real initialized data section no padding, no bss overlap.

SECT_BSS

The real uninitialized data section no padding.

SECT_COMMON

The section common symbols are allocated in by the link editor.

SEG_OBJC

Objective-C runtime segment.

SECT_OBJC_SYMBOLS

Symbol table.

SECT_OBJC_MODULES

Module information.

SECT_OBJC_STRINGS

String table.

SECT_OBJC_REFS

String table.

SEG_ICON

The icon segment.

SECT_ICON_HEADER

The icon headers.

SECT_ICON_TIFF

The icons in tiff format.

SEG_LINKEDIT

The segment containing all structs created and maintained by the link editor. Created with -seglinkedit option to ld(1) for MH_EXECUTE and FVMLIB file types only.

SEG_UNIXSTACK

The unix stack segment.

SEG_IMPORT

The segment for the self (dyld) modifing code stubs that has read, write and execute permissions.

Meta