The popl instruction then pops this address into ebx

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 483e6: a1 48 80483eb: 89 08 80483ed: 5d 80483ee: c3 push mov sub call xor mov pop ret nop nop nop %ebp %esp,%ebp $0x8,%esp 80483c8 <swap> %eax,%eax %ebp,%esp %ebp swap(); 5c 94 04 08 94 04 08 48 95 04 08 58 08 push mov mov mov movl mov mov mov mov mov pop ret %ebp 0x804945c,%edx 0x8049458,%eax %esp,%ebp $0x8049458,0x8049548 %ebp,%esp (%edx),%ecx %eax,(%edx) 0x8049548,%eax %ecx,(%eax) %ebp Get *bufp0 Get buf[1] bufp1 = &buf[1] 95 04 08 Get *bufp1 code/link/p-exe.d (a) Relocated .text section. code/link/pdata-exe.d 1 2 3 4 08049454 <buf>: 8049454: 01 00 00 00 02 00 00 00 0804945c <bufp0>: 804945c: 54 94 04 08 Relocated! code/link/pdata-exe.d (b) Relocated .data section. Figure 7.10: Relocated .text and data sections for executable file p The original C code is in Figure 7.1. 7.8. EXECUTABLE OBJECT FILES 371 7.8 Executable Object Files We have seen how the linker merges multiple object modules into a single executable object file. Our C program, which began life as a...
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.

Ask a homework question - tutors are online