Data and Program Representation Flashcards
Memory contains address from ___ to ___ for 32 bit architecture.
0, 2^32 - 1 // 0 to 4GB -1
Memory sections:
Text is for ___.
Instructions that the program runs
Memory sections:
Data is for ___.
Initialized global variables
Memory sections:
Rodata is for ___.
Read Only Data. String constants
Memory sections:
Bss is for ___.
Uninitialized global variables. They are initialized to 0
Memory sections:
Heap is for ___.
Storing the memory returned when calling malloc/new
Memory sections:
Stack is for ___.
Storing local variables and return addresses
Heap grows __, stack grows __.
upwards; downwards
There will never be gaps that do not have any memory mapping.
True/False
False.
SEGV Signal if occurs
A program includes \_\_\_. (5 items):- Machine \_\_\_\_ Initialized \_\_\_ Library \_\_\_\_ Memory \_\_\_ that the program will use Undefined \_\_\_ in the executable that will be known until the program is loaded into memory
instruction, data, dependencies, sections, values
File formats:
ELF = ?
Executable Link File
File formats:
COFF = ?
Common Object File Format
Match the file formats to their descriptions (ELF, COFF, a.out).
- Used in most UNIX systems
- Used in early UNIX; very restrictive
- Used in Windows Systems
ELF, a.out, COFF
1: After a program is written, the preprocessor expands ____ and generates ____ file.
preprocessor statements, .i
2: The compiler compiles .i file, ____ it and generates an ____ listing __ file.
optimizes, assembly instruction, .s
3: The assembler ___ .s file and generates an ___ file.
assembles, .o
4: The ___ put together all .o files and the .o files in ____ libraries.
linker, shared
The linker verifies the ___ needed by the program are satisfied, if not, ___.
symbols, error occurs
____ (.a files) are added to the executable, ___ (.so files) are not added to the executable files.
static libraries, shared libraries