This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ader, the segment header table, and the .init, .text, and .rodata sections. Lines 3 and 4 tell us that the second segment (the data segment) is aligned to a 4 KB boundary, has read/write permissions, starts at memory address 0x08049448, has a total memory size of 0x104 bytes, and is initialized with the 0xe8 bytes starting at ﬁle offset 0x448, which in this case is the beginning of the .data section. The remaining bytes in the segment correspond to .bss data that will initialized to zero at run time. 372 CHAPTER 7. LINKING
Read-only code segment 1 2 LOAD off 0x00000000 vaddr 0x08048000 paddr 0x08048000 align 2**12 filesz 0x00000448 memsz 0x00000448 flags r-x
Read/write data segment 3 4 LOAD off 0x00000448 vaddr 0x08049448 paddr 0x08049448 align 2**12 filesz 0x000000e8 memsz 0x00000104 flags rwcode/link/p-exe.d Figure 7.12: Segment header table for the example executable p. Legend: off: ﬁle offset, vaddr/paddr: virtual/physical address, align:, segment alignment, filesz: segment size in the object ﬁle, memsz: segment size in memory, flags: run-time permissions. 7.9 Loading Executable Object Files
View Full Document