This preview shows page 1. Sign up to view the full content.
Unformatted text preview: e is a sequence of bytes, and an object ﬁle is an object module stored on disk in a ﬁle. However, we will use these terms interchangeably. 7.4. RELOCATABLE OBJECT FILES 353 Object ﬁle formats vary from system to system. The ﬁrst Unix systems from Bell Labs used the a.out format. (To this day, executables are still referred to as a.out ﬁles.) Early versions of System V Unix used the Common Object File format (COFF). Windows NT uses a variant of COFF called the Portable Executable (PE) format. Modern Unix systems — such as Linux, later versions of System V Unix, BSD Unix variants, and Sun Solaris — use the Unix Executable and Linkable Format (ELF). Although our discussion will focus on ELF, the basic concepts are similar, regardless of the particular format. 7.4 Relocatable Object Files
Figure 7.3 shows the format of a typical ELF relocatable object ﬁle. The ELF header begins with a 16-byte sequence that describes the word size and byte ordering of the system that generated the ﬁle. The rest of the ELF header contains information that allows a linker to parse and inte...
View Full Document