Question: 1 2 . For each of the following code snippets, write down all symbols in the resulting object files from compilation. Write whether it is

12. For each of the following code snippets, write down all symbols in the resulting object files from compilation. Write whether it is a weak global, strong global, or local variable, and what section of the final compiled ELF binary the variable will go into. Fill in the value if you have enough information to determine the value.
This problem will be gscored automatically Please follow the rules. of course. Do NOT write this character()in the answer.
Please sort symbols for each file in ascending order (e.g. x->y, not y->x).( Symbol., x, y, z, a a, x, y, z.)
Strength/scope should be one of the following: weak local,strong local, and strong global. lease only one whitespace must be given in your answer.
If value is not assigned or not available, please write N/A.
ELF section answers should start with dot(.)..data,.text,.bss, etc.
foo.c
short x =5;
short y =2;
main.c
#include
int x;
int y;
int z =0;
int main(){
printf(%x
,x);
printf(%x
,y);
x=0xdeadbeef;
printf(%x
,x);
printf(%x
,y);
return 0;
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!