Unformatted text preview:

Chapter 3 Loaders and LinkersPurpose and FunctionKinds of LoadersKinds of loaders (cont.)Slide 5Methods of RelocationMask Method of RelocationProgram LinkingLOADINGData Structures for LoadingChapter 3Loaders and LinkersPurpose and FunctionPlaces object program in memoryLinking–Combines 2 or more obj programsRelocation–Allows loading at different locationsLinkage Editor–Provides linking without loadingKinds of LoadersAbsolute–Single pass–Checks for correct header record–Checks for sufficient available memory–Moves each text record to proper location–Upon seeing END passes control to the pgmKinds of loaders (cont.)bootstrap–A special absolute loader–ROM–Loads the OSKinds of loaders (cont.)Relocating–Modifies appropriate addresses–Loads object program at a variety of locations–May perform loading during execution (repeatedly)–Allows for multiple programs (multiprocessing)–System libraries require relocationMethods of RelocationModification recordsUse absolute addressing and fixed format–No modification records required–Use same text records with flag (relocation bit)–Relocation bits gathered into a mask–If relocation bit is 1, add starting address to wordMask Method of RelocationHCOPY 000000001077A ^ ^ ^T0000001EFFC1400334810390000362800303000154810613C000300002A0C003900002D ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^FFC 111111111100 all 10 words need modificationT 00001E 15 E00 0C0036 481061 080033 4C0000 454F46 000003 000000^ ^ ^ ^ ^ ^ ^ ^ ^ ^E00 111000000000 instructions 0,1,2 need load addresses T0000391EFFC0400300000030E0105D30103FD8105D2800303010575480392C105E38103F ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^T0010570A8001000364C0000F1001000^ ^ ^ ^ ^ ^ ^The F1 fouls up alignment, thus a new text record has to be started. FIGURE 3.7Program LinkingNecessary for separate CSECTSExternal ReferencesExternal DefinitionsLOADINGForward references to external symbols commonUse 2 pass–Pass 1 assigns addr. to external symbolsProvides a load map (info in symbol table)–Pass 2 performs actual loading, relocation, and linkingData Structures for LoadingESTAB external symbol table – Stores–Names–Addresses–CSECT of external symbolsPROGADDR – program load address–Provided by the OSCSADDR – CSECT addr. of control sect.


View Full Document

UNF COP 3601 - Loaders and Linkers

Documents in this Course
Load more
Download Loaders and Linkers
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Loaders and Linkers and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Loaders and Linkers 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?