Electrical Engineering > QUESTIONS & ANSWERS > University of Michigan-EECS 370-Homework 3 - Solution, ALL ANSWERS CORRECT,100% SCOREE (All)

University of Michigan-EECS 370-Homework 3 - Solution, ALL ANSWERS CORRECT,100% SCOREE

Document Content and Description Below

1. Submit a pdf of your typed or handwritten homework on Gradescope. You should have received an email inviting you to the Gradescope course. If you have not, please go to www.gradescope.com​, reg... ister for an account ​using your university email address​ (if necessary), then add yourself to this course using the entry code ​MZRKB3​. 2. Your answers should be neat, clearly marked, and concise. Computer ​written work is recommended (but not required). Show all your work, and state any special or non​-obvious assumptions you make. 3. You may discuss your solution methods or your answers with other students, but the solutions you submit must be your own.Problem 1: Linking (20 points) a) Complete the symbol and relocation tables for Main.o and Michigan.o below. Symbol types are either Text (T), Data (D), or Undefined (U). Offset is the offset into the appropriate section of the file for either the Text section or Data section. Undefined symbols do not need an offset. Assume all loads and stores are 32-bit. ​(10 pts: -0.75 pt for each incorrect row, maximum of -10 if mostly wrong) Format of an entry in the symbol table: ​<unresolved symbol> <type> <offset> Format of a relocation table entry: ​<instr. address> <instr.> <unresolved symbol> Main.o Michigan.o Header Size of Text 0x18 Size of Text 0x1C Size of Data 0x8 Size of Data 0x8 Text Main​: 0x00 store [A] = X1 Go​: 0x00 load X4 = [D] 0x04 load X7 = [C] 0x04 bl Blue 0x08 bl Go 0x08 store [C] = X6 0x0C X2 = X3 + X4 0x0C return 0x10 bl Blue Blue​: 0x10 load X7 = [B] 0x14 return 0x14 X6 = X7 + 1 0x18 0x18 return Data A 0x0 4 C 0x0 3 B 0x4 5 D 0x4 -1 Symbol tables ABCM ain Go Blue DDUTUU 0x0 0x4 ---- 0x0 ---- ---- Go DBCB lue TDUDT 0x0 0x4 ---- 0x0 0x10 Relocation tables 0x00 store A 0x00 load D 0x04 load C 0x04 bl Blue 0x08 bl Go 0x08 store C 0x10 bl Blue 0x10 load Bb) ​Link Main.o and Michigan.o to create one executable. Make sure to resolve addresses of all symbols and that all function calls branch to PC + offset + 4. There should be no symbols in your machine code. (10 pts) ​(-0.75 pts for each incorrect row, maximum of -10 if mostly wrong) Executable Fill in the right two columns as appropriate. We may have provided more address space than necessary. Header Size of Text 0x​34 Size of Data 0x​10 Text 0x00 Main: Store [0x100] = [Show More]

Last updated: 1 year ago

Preview 1 out of 9 pages

Add to cart

Instant download

document-preview

Buy this document to get the full access instantly

Instant Download Access after purchase

Add to cart

Instant download

Reviews( 0 )

$7.00

Add to cart

Instant download

Can't find what you want? Try our AI powered Search

OR

REQUEST DOCUMENT
158
0

Document information


Connected school, study & course


About the document


Uploaded On

Apr 23, 2021

Number of pages

9

Written in

Seller


seller-icon
Expert Tutor

Member since 3 years

57 Documents Sold


Additional information

This document has been written for:

Uploaded

Apr 23, 2021

Downloads

 0

Views

 158

Document Keyword Tags

What is Browsegrades

In Browsegrades, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Browsegrades · High quality services·