Next: ELF Data Representation
Up: The ELF File Format
Previous: ELF Sections
Segments are a way of grouping related sections. For example, the text segment groups
executable code, the data segment groups the program data,
and the dynamic segment groups
information relevant to dynamic loading. Each segment consists of one or
more sections. A process image is created by loading and interpreting segments. The
operating system logically copies a file’s segment to a virtual memory segment according
to the information provided in the program header table. The OS can also use segments
to create a shared memory resource.
Figure 2.9
summarizes the sections that might be included in a segment.
Figure:
Data representation. This figure illustrates the representation
of ELF data. These data descriptions are machine independent so
that a data type that is designated as an Elf32_Half will be
the same size on all machines. An Elf32_Half might be used to represent
an unsigned short or an unsigned char on some machines.
The association between language data types and ELF data types is made in
the file
<sys/elftypes.h>.
 |
Michael L. Haungs
1998-09-21