This preview shows page 1. Sign up to view the full content.
Unformatted text preview: rstanding of PC-relative addressing. A. The hex address of the relocated reference in line 5 is 0x80483bb. B. The hex value of the relocated reference in line 5 is 0x9. Remember that the disassembly listing shows the value of the reference in little-endian byte order. C. The key observation here is that no matter where the linker locates the .text section, the distance between the reference and the swap function is always the same. Thus, because the reference is a PC-relative address, its value will be 0x9, regardless of where the linker locates the .text section. B.8. EXCEPTIONAL CONTROL FLOW
Problem 7.5 Solution: [Pg. 374] 725 How C programs actually start up is a mystery to most programmers. These questios check your understanding of this startup process. You can answer them by referrig to the C startup code in Figure 7.14: A. Every program needs a main function, because the C startup code, which is common to every C program, jumps to a function called main. B. If main terminates with a return statement, then control passes back to the sta...
View Full Document