Day 10-11 - 10/11/11 (NOT RESPONSIBLE FOR ON MIDTERM) CSE...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
10/11/11 (NOT RESPONSIBLE FOR ON MIDTERM) CSE 361S – Linking One step translation o Simple translation will work Takes m.c (ASCII source file) and translates into p (Binary executable object file) o Problems: Efficiency: small change requires complete recompilation Modularity: hard to share common functions (e.g. printf) o Solution Static linker (or linker) Linker o Separately compiled relocatable object files o Linker: Combines these two object files and returns Executable oject file (contains code and data for all functions defined in both source files o Merges multiple relocatable (.o) object files into a single executable object file o Resolves external references External reference: reference to a symbol defined in another object file o Relocates symbols from their relative locations in the .o files to new absolute positions in the executable o Updates all references to these symbos to reflect their new positions. References can be in either code or data
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

Day 10-11 - 10/11/11 (NOT RESPONSIBLE FOR ON MIDTERM) CSE...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online