ELF object file format ElF header Program header table (required for executables) text section data section bss section symtab rel. txt rel.data debue g line strap Section header table (required for relocatables) Figure 7.3 P544
6 ELF header Program header table (required for executables) .text section .data section .bss section .symtab .rel.txt .rel.data .debug Section header table (required for relocatables) .line .strtab ELF object file format Figure 7.3 P544
7.3 Ob ject Files
7 7.3 Object Files
Obiect files Relocatable object file Contain binary code and data in a form that can be combined with other relocatable ob ject files to create an executable file Executable object file Contains binary code and data in a form that can be copied directly into memory and executed
8 Object files • Relocatable object file – Contain binary code and data in a form that can be combined with other relocatable object files to create an executable file • Executable object file – Contains binary code and data in a form that can be copied directly into memory and executed
Obiect files Shared ob Ject file e A special type of relocatable object file that can be loaded into memory and linked dynamically,at either load time or run time
9 Object files • Shared object file – A special type of relocatable object file that can be loaded into memory and linked dynamically, at either load time or run time
7.2 Static Linking
10 7.2 Static Linking