+ Figure 1-1: Object File Format

  Linking View                      Execution View
  ============                      ==============
  ELF header                        ELF header

(moveable)
  Program header table (for exe's)  Program header table
  Section 1                         Segment 1
  ...                               Segment 2
  Section n                         ...
  Section header table              Section header table (optional)



+ Figure 1-2: 32-Bit Data Types

  Name           Size Alignment   Purpose
  ====           ==== =========   =======
  Elf32_Addr      4       4       Unsigned program address
  Elf32_Half      2       2       Unsigned medium integer
  Elf32_Off       4       4       Unsigned file offset
  Elf32_Sword     4       4       Signed large integer
  Elf32_Word      4       4       Unsigned large integer
  unsigned char   1       1       Unsigned small integer



+ Figure 1-3: ELF Header

  #define EI_NIDENT       16

  typedef struct {
      unsigned char       e_ident[EI_NIDENT];
      Elf32_Half          e_type;
      Elf32_Half          e_machine;			
      Elf32_Word          e_version;
      Elf32_Addr          e_entry;
      Elf32_Off           e_phoff;
      Elf32_Off           e_shoff;
      Elf32_Word          e_flags;			0 for x86
      Elf32_Half          e_ehsize;
      Elf32_Half          e_phentsize;
      Elf32_Half          e_phnum;
      Elf32_Half          e_shentsize;
      Elf32_Half          e_shnum;
      Elf32_Half          e_shstrndx;
  } Elf32_Ehdr;


+ Figure 1-4: e_ident[] Identification Indexes

  Name           Value  Purpose
  ====           =====  =======
  EI_MAG0            0  File identification
  EI_MAG1            1  File identification
  EI_MAG2            2  File identification
  EI_MAG3            3  File identification
  EI_CLASS           4  File class
  EI_DATA            5  Data encoding
  EI_VERSION         6  File version
  EI_PAD             7  Start of padding bytes
  EI_NIDENT         16  Size of e_ident[]

These indexes access bytes that hold the following values.

* EI_MAG0 to EI_MAG3

  A file's first 4 bytes hold a ``magic number,'' identifying the file
  as an ELF object file.

                  Name       Value  Position
                  ====       =====  ========
                  ELFMAG0    0x7f   e_ident[EI_MAG0]
                  ELFMAG1    'E'    e_ident[EI_MAG1]
                  ELFMAG2    'L'    e_ident[EI_MAG2]
                  ELFMAG3    'F'    e_ident[EI_MAG3]
* EI_CLASS
                 Name           Value  Meaning
                 ====           =====  =======
                 ELFCLASSNONE       0  Invalid class
                 ELFCLASS32         1  32-bit objects		x86
                 ELFCLASS64         2  64-bit objects
* EI_DATA
             ELFDATANONE        0  Invalid data encoding
             ELFDATA2LSB        1  See below			x86
             ELFDATA2MSB        2  See below
* EI_VERSION
		must be EV_CURRENT
* EI_PAD






* e_type
               Name        Value  Meaning
               ====        =====  =======
               ET_NONE         0  No file type
               ET_REL          1  Relocatable file
               ET_EXEC         2  Executable file
               ET_DYN          3  Shared object file
               ET_CORE         4  Core file
               ET_LOPROC  0xff00  Processor-specific
               ET_HIPROC  0xffff  Processor-specific
* e_machine
                    EM_386        3  Intel 80386
* e_version
                 EV_NONE          0  Invalid version
                 EV_CURRENT       1  Current version
* e_entry 			where to jmp, virtual  
* e_phoff
blablabla


