The movzbl instruction sets the other three bytes to

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: nces, including the following: Disassembly of function sum in executable file prog 1 2 3 4 5 6 7 8 9 10 080483b4 <sum>: 80483b4: 55 80483b5: 89 e5 80483b7: 8b 45 0c 80483ba: 03 45 08 80483bd: 01 05 64 94 04 08 80483c3: 89 ec 80483c5: 5d 80483c6: c3 80483c7: 90 push mov mov add add mov pop ret nop %ebp %esp,%ebp 0xc(%ebp),%eax 0x8(%ebp),%eax %eax,0x8049464 %ebp,%esp %ebp Note that this code is almost identical to that generated by the disassembly of code.c. One main difference is that the addresses listed along the left are different—the linker has shifted the location of this code to a different range of addresses. A second difference is that the linker has finally determined the location for storing global variable accum. On line 5 of the disassembly for code.o the address of accum was still listed as 0. In the disassembly of prog, the address has been set to 0x8049444. This is shown in the assembly code rendition of the instruction. It can also be seen in the last four bytes of the instruction, list...
View Full Document

Ask a homework question - tutors are online