ELF Object File Format Flashcards
(1) Elf header
Word size, byte ordering, file type (.o, exec, .so), machine type, etc.
ex of some info stored in a header: 64bit, little endian, linux, executable (.out), AMD x86-64, as well as pointers to program header table & address of the entry point
(2) segment header table
Page size, virtual addresses memory segments (sections), segment sizes.
This part of ELF is required for executables
(3) .text
code. yummy c code. c code yum
(4) .rodata
“read only” data section
jump tables, static constants, etc..
(5) .data
initialized global vars
(6) .bss
Uninitialized global variables
“Block Started by Symbol”
“Better Save Space”
Has section header but occupies no space
(7) .symtab
Symbol table
Procedure and static variable names
Section names and locations
(8) .rel.text
Relocation info for .text section
Addresses of
instructions that will need to be
modified in the executable
Instructions for modifying.
(9) .rel.data
Relocation info for .data section
Addresses of pointer data that will need to be
modified in the merged executable
(10) .debug
info for symbolic debugging (gcc -g)
(11) section header table
offsets and sizes of each section