This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ect ﬁle, except that these sections have been relocated to their eventual run-time memory addresses. The .init section deﬁnes 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 .relo sections. ELF executables are designed to be easy to load into memory, with contiguous chunks of the executable ﬁle mapped to contiguous memory segments. This mapping is described by the segment header table. Figure 7.12 shows the segment header table for our example executable p, as displayed by OBJDUMP. From the segment header table, we see that two memory segments will be initialized with the contents of the executable object ﬁle. Lines 1 and 2 tell us that the ﬁrst segment (the code segment) is aligned to a 4 KB (¾½¾ ) boundary, has read/execute permissions, starts at memory address 0x08048000, has a total memory size of 0x448 bytes, and is initialized with the ﬁrst 0x448 bytes of the executable object ﬁle, which includes the ELF he...
View Full Document
- Spring '10
- The American