EFI 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) 16 Figure 7.3 P544
16 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 EFI object file format Figure 7.3 P544
EFI object file format Elf header magic number, type (o, exec, . so), machine, byte ordering, etc Program header table page size, virtual addresses for memory segments (sections), segment sizes
17 EFI object file format • Elf header – magic number, type (.o, exec, .so), machine, byte ordering, etc. • Program header table – page size, virtual addresses for memory segments (sections), segment sizes
EFI object file format text section code data section initialized (static)data bss section uninitialized (static)data Block Started by Symbol Better Save Space has section header but occupies no space 18
18 EFI object file format • .text section – code • .data section – initialized (static) data • .bss section – uninitialized (static) data – “Block Started by Symbol” – “Better Save Space” – has section header but occupies no space
EFI object file format symtab section symbol table procedure and static variable names section names and locations rel.text section relocation info for text section addresses of instructions that will need to be modified in the executable instructions for modifying
19 EFI object file format • .symtab section – symbol table – procedure and static variable names – section names and locations • .rel.text section – relocation info for .text section – addresses of instructions that will need to be modified in the executable – instructions for modifying
EFI object file format reldata section relocation info for data section addresses of pointer data that will need to be modified in the merged executable debug section debugging symbol table, local variables and typedefs, global variables, original C source file (gcc -g)
20 EFI object file format • .rel.data section – relocation info for .data section – addresses of pointer data that will need to be modified in the merged executable • .debug section – debugging symbol table, local variables and typedefs, global variables, original C source file (gcc -g)