8 abort handling the abort handler passes control 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: er the following version of the swap.c function that counts the number of times it has been called. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 extern int buf; int *bufp0 = &buf[0]; static int *bufp1; static void incr() { static int count=0; count++; } void swap() { int temp; incr(); bufp1 = &buf[1]; temp = *bufp0; 384 20 21 22 CHAPTER 7. LINKING *bufp0 = *bufp1; *bufp1 = temp; } For each symbol that is defined and referenced in swap.o, indicate if it will have a symbol table entry in the .symtab section in module swap.o. If so, indicate the module that defines the symbol (swap.o or main.o), the symbol type (local, global, or extern) and the section (.text, .data, or .bss) it occupies in that module. Symbol buf bufp0 bufp1 swap temp incr count swap.o .symtab entry? Symbol type Module where defined Section Homework Problem 7.7 [Category 1]: Without changing any variable names, modify bar5.c on Page 360 so that foo5.c prints the correct values of x and y (i.e., the hex representations of integers 15213 and 15212). Homework Problem 7.8 [Category 1]: In this problem, let REF(x.i) --...
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