next up previous contents
Next: ELF Data Representation Up: The ELF File Format Previous: ELF Sections

ELF Segments

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>.
\begin{figure}
\begin{tex2html_preform}\begin{verbatim}
Name Size Alignment Pu...
...nteger\end{verbatim}\end{tex2html_preform}
\rule{6.5in}{0.3mm}
\end{figure}



Michael L. Haungs
1998-09-21