74 w richard stevens tcpip illustrated the

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: 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

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