This preview shows page 1. Sign up to view the full content.
Unformatted text preview: entries> jmp pushl jmp *0x8049680 $0x0 8048444 # jmp to *GOT # ID for printf # jmp to PLT jmp pushl jmp *0x8049684 $0x8 8048444 # jump to *GOT # ID for addvec # jmp to PLT Figure 7.18: The procedure linkage table (PLT) for executable p2. The original code is in Figures 7.5 and 7.6. Initially, after the program has been dynamically linked and begins executing, procedures printf and addvec are bound to the ﬁrst instruction in their respective PLT entries. For example, the call to addvec has the form:
80485bb: e8 a4 fe ff ff call 8048464 <addvec> When addvec is called the ﬁrst time, control passes to the ﬁrst instruction in PLT, which does an indirect jump through GOT. Initially, each GOT entry contains the address of the pushl entry in the corresponding PLT entry. So the indirect jump in the PLT simply transfers control back to the next instruction in PLT. This instruction pushes an ID for the addvec symbol onto the stack. The last instruction jumps to PLT, which pushes another word of id...
View Full Document
This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.
- Spring '10
- The American