Assembling & Linking Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What does an assembler do?

A

Reads an assembly language source file from beginning to end, producing an (relocatable) object file as output

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

A symbol table maps ______ to _______

A

symbols; values

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

Absolute Symbol

A

Symbol whose value does not depend on where in memory the current segment is loaded

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

Relocatable

A

Non-absolute symbols

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

What is a backpatch list?

A

Describes dependency of code/data on unknown information

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

What does a linker do?

A

Combines several relocatable object files to produce a single executable file

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

What is static linking?

A

Linking prior to runtime; copies library into program

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

What is dynamic linking?

A

Library not copied into program, but has references to functions in it. System looks for library at runtime.

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

What are strong symbols?

A

Procedures and initialized globals

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

What are weak symbols?

A

Uninitialized globals

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

What are the Linker’s symbol rules?
1.
2.
3.

A
  1. Multiple strong symbols are not allowed
  2. Given a strong symbol and multiple weak symbols, choose the strong symbol
    *(reference to weak symbol resolve to strong symbol)
  3. If there are multiple weak symbols, pick and arbitrary one
    *(can be overridden with gcc -fno-common)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is an ELF (Executable and Linkable Format)

A

Standard binary format for object files

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

What is the standard binary format for object files?

A

ELF (Executable and Linkable Format)

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

Where should libraries be put in the command line?

A

At the end

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

What is linking?

A

Technique that allows programs to be constructed from multiple object files

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

When can linking happen?

A

Compile/Load/Run time