...
In the third line of Listing 5-1, the vmlinux image (the kernel proper) is linked. Following that, a number of additional object modules are processed. These include head.o, piggy.o,[37] and the architecture-specific head-xscale.o, among others. (The tags identify what is happening on each line. For example, AS indicates that the assembler is invoked, GZIP indicates compression, and so on.) In general, these object modules are specific to a given architecture (ARM/XScale, in this example) and contain low-level utility routines needed to boot the kernel on this particular architecture. Table 5-1 details the components from Listing 5 -1.
Table 5-1. ARM/XScale Low-Level Architecture Objects
Component | Function/Description |
---|---|
vmlinux | Kernel proper, in ELF format, including symbols, comments, debug info (if compiled with -g) and architecture-generic components. |
System.map | Text-based kernel symbol table for vmlinux module. |
Image | Binary kernel module, stripped of symbols, notes, and comments. |
head.o | ARM-specific startup code generic to ARM processors. It is this object that is passed control by the bootloader. |
piggy.gz | The file Image compressed with gzip. |
piggy.o | The file piggy.gz in assembly language format so it can be linked with a subsequent object, misc.o (see the text). |
misc.o | Routines used for decompressing the kernel image (piggy.gz), and the source of the familiar boot message: 'Uncompressing Linux … Done' on some architectures. |
head-xscale.o | Processor initialization specific to the XScale processor family. |
big-endian.o | Tiny assembly language routine to switch the XScale processor into big-endian mode. |
vmlinux | Composite kernel image. Note this is an unfortunate choice of names, because it duplicates the name for the kernel proper; the two are not the same. This binary image is the result when the kernel proper is linked with the objects in this table. See the text for an explanation. |
zImage | Final composite kernel image loaded by bootloader. See the following text. |
An illustration will help you understand this structure and the following discussion. Figure 5-1 shows the image components and their metamorphosis during the build process leading up to a bootable kernel image. The following sections describe the components and process in detail.
Figure 5-1. Composite kernel image construction

5.1.1. The Image Object
After the vmlinux kernel ELF file has been built, the kernel build system continues to process the targets described in Table 5-1. The Image object is created from the vmlinux object. Image is basically the vmlinux ELF file stripped of redundant sections (notes and comments) and also stripped of any debugging symbols that might have been present. The following command is used for this:
xscale_be-objcopy -O binary -R .note -R .comment -S
vmlinux arch/arm/boot/Image
In the previous objcopy command, the -O option tells objcopy to generate a binary file, the -R option removes the ELF sections named .note and .comment, and the -S option is the flag to strip debugging symbols. Notice that objcopy takes the vmlinux ELF image as input and generates the target binary file called Image. In summary, Image is nothing more than the kernel proper in binary form stripped of debug symbols and the .note and .comment ELF sections.
5.1.2. Architecture Objects
Following the build sequence further, a number of small modules are compiled. These include several assembly language files (head.o, head-xscale.o, and so on) that perform low-level architecture and processor- specific tasks. Each of these objects is summarized in Table 5-1. Of particular note is the sequence creating the object called piggy.o. First, the Image file (binary kernel image) is compressed using this gzip command: