Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:image text in transcribed

(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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions