Question: System Level Programming: (2,6,12) FORUT 19 Linker: Please read the following code and answer questions below: /* main.c*/ void swap(); int buf[2] = {1, 2};

System Level Programming:System Level Programming: (2,6,12) FORUT 19 Linker: Please read the following code

(2,6,12) FORUT 19 Linker: Please read the following code and answer questions below: /* main.c*/ void swap(); int buf[2] = {1, 2}; int main() { swap(); return 0; /* swap.c*/ extern int buf[]; int *bufpo=&buf[0]; int *bufp1; void swap() { int temp; bufn1=&buf[1]; temp = *bufpo; *bufpo = *bufp1; *bufp1 = temp; } 1. List all the global symbols in swap.c and specify each of them as either a strong symbol or a weak symbol. 2. Read the following relocation table dumped from swap.obj of its text section. Please list all the symbols that need to be relocated. RELOCATIONS #4 Symbol Index Symbol Name Offset Type Applied To DESSE 0000001A DIR32 0000001E DIR32 00000023 DIR32 0000002E DIR32 00000033 DIR32 0000003D DIR32 00000000 00000004 00000000 00000000 00000000 00000000 10 _bufp1 F _buf E _bufpo E _bufpo 10_bufp1 10 _bufp1

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!