Linking Eric McCreath Introduction One of the key resources that - - PowerPoint PPT Presentation

linking
SMART_READER_LITE
LIVE PREVIEW

Linking Eric McCreath Introduction One of the key resources that - - PowerPoint PPT Presentation

Linking Eric McCreath Introduction One of the key resources that an operating system is called upon to manage is main (primary) memory. Generally a programer does not have to worry about which particular addresses are used for their programs.


slide-1
SLIDE 1

Linking

Eric McCreath

slide-2
SLIDE 2

2

Introduction

One of the key resources that an operating system is called upon to manage is main (primary) memory. Generally a programer does not have to worry about which particular addresses are used for their programs. The compiler/OS does this for you. However, it is good to gain a basic understanding of how all these addresses are put together.

slide-3
SLIDE 3

3

Address Binding

For a program to execute it must be copied into main memory at a particular location. Many instructions use 'fixed' addresses which must be bound to 'fixed' locations in the memory. This binding of instructions and data to memory addresses may

  • ccur at :

compile time, load time, or execution time.

slide-4
SLIDE 4

4

Linking Loading

slide-5
SLIDE 5

5

Memory Layout

from COMP2300 2010 slides

slide-6
SLIDE 6

6

ELF

from 2010 COMP2300 slides

slide-7
SLIDE 7

7

Libraries

Libraries may be either: statically linked - the library is compiled into the final binary executable. dynamically linked - just a 'stub' is includes in the binary executable, the library code is obtained as needed during execution.