ELF is a standard binary format to represent object files and
programs. What you have to know about ELF is that:
- It splits the program in several parts called sections.
There is a section for the code (.text), a section for
the initialized data (.data), a section for uninitialized
data (.bss) and many other sections (debug, symbols,
relocations, init code, vectors, ...)
- When an ELF file contains relocations it is a relocatable
object file and the sections (code, data) can be mapped at any
address by the linker. When such object file is disassembled by m6811-elf-objdump it appears as though it starts at address 0.
- The linker is responsible for collecting the ELF object files and
creating the final program. During this pass, it can merge the
sections as well as create new sections. It also uses the relocations to fixup the final addresses of the program.
- The GNU debugger needs the ELF file in order to have access to
the symbol table as well as the debugging information.
- The m6811-elf-objcopy tool may be used to convert the ELF
binary format in either S19, Intel Hex, or plain binary image.
|