Linking Flashcards

1
Q

.text

A

The machine code of the compiled program, stores function defs.

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

.rodata

A

Read only data, eg string constants in formatting strings, jump tables

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

.data

A

INITIALIZED global and static C variables

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

.bss

A

UN-INITIALIZED global and static C variables, values are allocated at runtime (“better save space”) that can be inited to zero (not pointers or structs)

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

.symtab

A

symbol table, info about functions and global vars.

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

.rel.text

A

A list of locations in the .text section that will need to be modified by the linker.

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

.rel.data

A

relocation information for any global variables, that will need to be modified by the linker.

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

.line

A

a mapping between source code and asm

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

.strtab

A

string table for the symbol table in the .symtable and .debug.

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

.debug

A

symbol table use to recover information about local vars and types defs for debugging purposes.

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

Global Symbols

A

Symbols that can be referenced by other modules. non-static C functions and Global Vars.

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

External Symbols

A

Global variables that are defined by “another” module

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

Local Symbols

A

Functions and Globals var declared with STATIC. cannot be seem by other modules.

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

COMMON

A

stores info about UN-INITIALIZED global vars

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

Strong Symbol

A

function, or inited global var

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

Weak Symbol

A

global Symbol that is un-initialized

17
Q

Resolve multiple strong symbols

A

Error. this cannot be done

18
Q

resolve multiple weak symbols

A

choose one arbitrarily

19
Q

resolve weak and strong symbol

A

choose the strong symbol

20
Q

Relocation Sections and Symbol definitions

A

1st step relocation. Linker merges all sections of the same type into a new aggregate section of the same type. then, run time memory addresses are assigned, each instr and global var has a unique address

21
Q

Relocating Symbol references within sections

A

linker modifies symbols in the code and data sections so that then now point to the correct runtime address