Dobin 0x11_MemoryLayout.pdf
Dobin 0x11_MemoryLayout.pdf
Dobin 0x11_MemoryLayout.pdf
9
0.0 (0)
R. Z.
R. Z.
This flashcard set covers the ELF (Executable and Linkable Format) memory layout at a university level. It delves into the structure of ELF files, including sections and segments like .text, .data, and .bss, and their roles in processes. The flashcards explain how ELF files are loaded into memory, detailing the stack, heap, and code regions. They also cover the characteristics of these memory regions and the process of creating a process from an ELF file. This set is beneficial for computer science students and professionals who need to understand the intricacies of memory management and file formats in operating systems.
Cartes-fiches
9
Utilisateurs
0
Langue
Anglais
Catégorie
Religion / Ethique
Niveau
Université
Créé / Mis à jour
21.06.2019 / 21.06.2019
-
- 1 / 9
-
Cartes-fiches
What are the charecteristics of the stack?
Stack:
- There is one contiguous memory region containing the stack for the process
- LIFO - Last in, First Out
- Contains funtion local variables
- Also contains: Saved Instruction Pointer (SIP)
- Current function adds data to the top (bottom) of the stack
What are the charecteristics of the heap?
Heap:
- There is on contiguous memory region containing the heap
- Memory allocator returns specific pieces of the memory region
- For malloc()
- Alos contains: heap management data
What is stored in the code region in memory?
Code region contains:
- Compiled program code
What is the ELF format, and name 3 types.
Programs are stored in ELF files
ELF: Executable and Linkable Format
- Like COFF, PE (EXE), ....
ELF types:
- ET_EXEC: Executable File
- ET_REL: Relocatable File
- ET_DYN: Shared Object File
ELF "views"
- Sections
- Segments
In the ELF format what can be contained in the sections?
Sections:
- .text: Executable instructions
- .bss: Unitialized data (usualy the heap)
- .data: initialized data
- .rodata: Read-Only data
- .got: Global Offset Table
- .plt: Prcedure Linkage Table
- .init / .fini: initialiyation instructions ("glibc")
What is the process of creating a process from an ELF file called and what are the sections and segments used for?
The process of creating a process from an ELF file is called: "Linking and Loading"
Sections:
- Are for compiler (gcc), to link several objec t files together (.o)
Segments:
- Are for the loader, to create the process
- Consists of one or more sections