Executable object files
-
Figure 7.13 summarizes the kinds of information in a typical ELF executable file.
- The ELF header describes the overall format of the file. It also includes the
program’s
entry point
, which is the address of the first instruction to execute when the program runs. - The
.text
,.rodata
, and.data
sections are similar to those in a relocatable object file, except that these sections have been relocated to their eventual run-time memory addresses. - The
.init
section defines a small function, called _init, that will be called by the program’s initialization code - Since the executable is fully linked (relocated), it needs no
.rel
sections. - ELF executables are designed to be easy to load into memory, with contiguous chunks of the executable file mapped to contiguous memory segments. This mapping is described by the program header table
- The ELF header describes the overall format of the file. It also includes the
program’s