In this reading we’ll look at how object files are produced and linked together to form an executable file. This topic will provide some insight into the structure of executable files and will provide the basis for us understanding how programs are loaded into memory and executed.
Sections 7.0 - 7.9, excluding sections 7.6.2-7.6.3 and 7.7.1-7.7.2 (pp. 670-684, 689-690, 695-698) from the course textbook.
Each student will be responsible for learning and demonstrating proficiency in the following objectives PRIOR to the class meeting. The reading quiz will test these objectives.
The following objectives should be mastered by each student DURING and FOLLOWING the class session through active work and practice.
These exercises are geared towards mastering the BASIC learning objectives listed above. You are expected to submit them before class and it is highly recommended that you complete them before attempting the reading quiz.
Which program (e.g. compiler or assembler) is responsible for each of the following tasks:
What is the difference between the .data
and .bss
sections in an object file?
How do global symbols in the symbol table differ from each of the following:
Consider the following C code.
int x;
int y = 5;
int addOne(int a) {
return a+1;
}
For each of the following symbols, indicate whether it is a strong or a weak symbol and briefly describe why.
x
:y
:addOne
: