This sequence of pc values is known as a logical

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: location entry: section offset, relocation type, and symbol name. Feel free to use tools such as OBJDUMP to help you solve this problem. Homework Problem 7.15 [Category 3]: Performing the following tasks will help you become more familiar with the various tools for manipulating object files. A. How many object files are contained in the versions of libc.a and libm.a on your system? B. Does gcc -O2 produce different executable code than gcc -O2 -g? C. What shared libraries does the GCC driver on your system use? 388 CHAPTER 7. LINKING 1 2 3 4 5 6 7 8 9 10 extern int p3(void); int x = 1; int *xp = &x; void p2(int y) { } void p1() { p2(*xp + p3()); } (a) C code. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 00000000 <p2>: 0: 55 1: 89 e5 3: 89 ec 5: 5d 6: c3 00000008 <p1>: 8: 55 9: 89 e5 b: 83 ec 08 e: 83 c4 f4 11: e8 fc ff ff ff 16: 89 c2 18: a1 00 00 00 00 1d: 03 10 1f: 52 20: e8 fc ff ff ff 25: 89 ec 27: 5d 28: c3 push mov mov pop ret %ebp %esp,%ebp %ebp,%esp %ebp push mov sub add call mov mov add push call mov pop ret %ebp %esp,%ebp $0x8,%esp $0xfffff...
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