Binary‐level program analysis: Executable File Formats
Gang Tan
CSE 597 Spring 2019 Penn State University
1
* Some slides adapted from those by Tomás Sánchez López at http://www.tomas‐sanchez.com/material/ELF.ppt
Binarylevel program analysis: Executable File Formats Gang Tan CSE - - PowerPoint PPT Presentation
Binarylevel program analysis: Executable File Formats Gang Tan CSE 597 Spring 2019 Penn State University * Some slides adapted from those by Toms Snchez Lpez at http://www.tomassanchez.com/material/ELF.ppt 1 Executable File
1
* Some slides adapted from those by Tomás Sánchez López at http://www.tomas‐sanchez.com/material/ELF.ppt
2
3
4
5
6
* From Wiki
7
8
9
LOAD Portion of file to be loaded into memory INTERP Pointer to dynamic linker for this executable (.interp section) DYNAMIC Pointer to dynamic linking information (.dynamic section)
10
11
12
13
.interp Path name of program interpreter (Dynamic linker) .text Code (executable instructions) of a program .data Initialized data .bss Uninitilized data .init Executable instruction for process initilization .fini Executalbe intructions for process termination .plt Holds the procedure linkage table .re.<x> Relocation information for section <x> .dynamic Dynamic linking information
14
15
16
int x = 5; extern int function(); int main() { int r = x +function (); exit (0); } int v = 10; int u = 32; int z; int function() { return v+u; }
file 2 file 1
17
System Code System Data main () int x = 5 funtion () int v = 10 int u = 32 int y
Relocatable Object files
Headers System code main () a () System Code System Data int x = 5 int v = 10 int u = 32
Uninitialized data
.text .data .bss
18
19
Relocatable File 1 Relocatable File N Executable Object File DLLs Execution Dynamic Linker Static Linking
20