|
|
Before proceeding further, you should become familiar with the following terms and conventions.
A section is the smallest portion of an object file that is relocated and treated as one separate and distinct entity. In the most common case, there are three sections named .text, .data, and .bss. Additional sections accommodate comments, multiple text or data segments, shared data segments, or user-specified sections. However, the operating system loads only .text, .data, and .bss into memory when the file is executed.
The physical address of a section or symbol is the offset of that section or symbol from address zero of the address space. The term physical address as used in COFF does not correspond to general usage. The physical address of an object is not necessarily the address at which the object is placed when the process is executed. For example, on a system with paging, the address is located with respect to address zero of virtual memory and the system performs another address translation. The section header contains two address fields, a physical address, and a virtual address; these addresses are equivalent on UNIX systems,
Compilers and link editors produce executable object files that are
intended to be run on a particular computer.
In the case of cross-compilers, the compilation and link editing are
done on one computer, with the intent of creating an object file that
can be executed on another computer.
The term,
target machine,
refers to the computer on which the object file is
destined to run.
In the majority of cases, the target machine is the
exact same computer
on which the object file is being created.