Program segments are made up of one or more program sections.
Each segment header entry specifies the location of the segment within the file, the
virtual memory address at which to load the segment at runtime, the size of the segment
within the file, and the size of the segment when loaded into memory. It is important to
note that a segment may occupy no space within a file and yet occupy some space in memory
at runtime. This is common when uninitialized data is present within a program.
The section header table contains information describing each program section. This
information is used at link time to assist in creating an executable image from compiled
object files. Following linking, this information is no longer required; thus the section
header table is an optional element (though it is generally present) in executable files.
Common sections included in most executables are
??? The .bss section describes the size and location of uninitialized program data.
This section occupies no space in the file but does occupy space when an
executable file is loaded into memory.
??? The .data section contains initialized program data that is loaded into memory
at runtime.
??? The .text section contains the program??™s executable instructions.
Pages:
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854