Shriver and b smith anatomy of a high performance

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: strong symbol defined in Module 1 over the weak symbol defined in Module 2 (Rule 2): (a) REF(main.1) --> DEF(main.1) (b) REF(main.2) --> DEF(main.1) B. This is an ERROR, because each module defines a strong symbol main (Rule 1). C. The linker chooses the strong symbol defined in Module 2 over the weak symbol defined in Module 1 (Rule 2): (a) REF(x.1) --> DEF(x.2) (b) REF(x.2) --> DEF(x.2) Problem 7.3 Solution: [Pg. 365] Placing static libraries in the wrong order on the command line is a common source of linker errors that confuses many programmers. However, once you understand how linkers use static libraries to resolve references, it’s pretty straightforward. This little drill checks your understanding of this idea: A. gcc p.o libx.a B. gcc p.o libx.a liby.a C. gcc p.o libx.a liby.a libx.a Problem 7.4 Solution: [Pg. 369] This problem concerns the disassembly listing in Figure 7.10. Our purpose here is to give you some practice reading disassembly listings and to check your unde...
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