Linking Cont. Flashcards

1
Q

The ____, copies the code and data in the executable file prog into memory, then transfers control to the beginning of the program

A

Loader

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

_____ _____ take as inpout a collection of relocatable object files and command-line arguments and generate as output a fully linked executable object file that can be loaded and run. The input relocatable object file consists of various code and data sections, were each section is a contiguous sequence of bytes. Instructions are in on section, initialized global variables in other, initialized variables are in yet another section

A

Static linkers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

To build and executable, the linker must perform two main tasks:

A
  1. Symbol resolution
  2. Relocation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The purpose of _______is to associate each symbol references with exactly once symbol definition

A

Symbol resolution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Compilers and assembler generate code and data section that start at address 0. The linker relocates these sections by associating a memory location with each symbol definition, and then modifying all the references to those symbols sot that they point to this memory location.

A

Relocation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Object files come in three forms

A
  1. Relocatable object file
  2. Executable object file
  3. Shared object file
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Contains binary code and data in a form that can be combined with other relocatable object files at compile time to create an executable object file

A

Relocatable object file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Contains binary code and data that can be coped directly into memory and executed

A

Executable objet file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

A special type of relocatable object file that can be loaded int memory and linked dynamically, at either load time or run time

A

Shared object file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The ____ header begin with a 16 byte sequence that describes the word size and byte order of the system that generated the file

A

ELF

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Sandwiched between the ELF header and the section header table are the _____ themselves

A

Sections

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

The machine code of compiled program

A

.text

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The read only data such as format string in print statement and jump tables for switch statements

A

.rodata

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Initialize global and static C variables. Local c variables are maintained at run time on the stack and do not appear in the .data or .bss sections

A

.data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Unitiliaze global and static C variables along with any global or static variables that are initialized to 0

A

.bss

How well did you know this?
1
Not at all
2
3
4
5
Perfectly