acrn-hypervisor/hypervisor/boot/guest
Zhou, Wu b394777908 HV: Add implements of 32bit and 64bit elf loader
This is a simply implement for the 32bit and 64bit elf loader.

The loading function first reads the image header, and finds the program
entries that are marked as PT_LOAD, then loads segments from elf file to
guest ram. After that, it finds the bss section in the elf section entries, and
clear the ram area it points to.

Limitations:
1. The e_type of the elf image must be ET_EXEC(executable). Relocatable or
   dynamic code is not supported.
2. The loader only copies program segments that has a p_type of
   PT_LOAD(loadable segment). Other segments are ignored.
3. The loader doesn’t support Sections that are relocatable
   (sh_type is SHT_REL or SHT_RELA)
4. The 64bit elf’s entry address must below 4G.
5. The elf is assumed to be able to put segments to valid guest memory.

Tracked-On: #6323

Signed-off-by: Zhou, Wu <wu.zhou@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2021-08-19 20:00:45 +08:00
..
bzimage_loader.c HV: Remove 'vm_' of vm_elf_loader and etc. 2021-08-19 20:00:45 +08:00
elf_loader.c HV: Add implements of 32bit and 64bit elf loader 2021-08-19 20:00:45 +08:00
rawimage_loader.c HV: Remove 'vm_' of vm_elf_loader and etc. 2021-08-19 20:00:45 +08:00
vboot_info.c HV: vm_load: rename vboot_info.h to vboot.h 2021-08-19 20:00:45 +08:00