The OpenD Programming Language

segment_command

The segment load command indicates that a part of this file is to be mapped into the task's address space. The size of this segment in memory, vmsize, maybe equal to or larger than the amount to map from this file, filesize. The file is mapped starting at fileoff to the beginning of the segment in memory, vmaddr. The rest of the memory of the segment, if any, is allocated zero fill on demand. The segment's maximum virtual memory protection and initial virtual memory protection are specified by the maxprot and initprot fields. If the segment has sections then the section structures directly follow the segment command and their size is reflected in cmdsize.

Members

Variables

cmd
uint cmd;

LC_SEGMENT.

cmdsize
uint cmdsize;

Includes sizeof section structs.

fileoff
uint fileoff;

File offset of this segment.

filesize
uint filesize;

Amount to map from the file.

flags
uint flags;

Flags.

initprot
int initprot;

Initial VM protection.

maxprot
int maxprot;

Maximum VM protection.

nsects
uint nsects;

Number of sections in segment.

segname
char[16] segname;

Segment name.

vmaddr
uint vmaddr;

Memory address of this segment.

vmsize
uint vmsize;

Memory size of this segment.

Meta