elfloader.h 454 B

123456789101112131415161718
  1. #pragma once
  2. #include <elf.h>
  3. #include "types.h"
  4. struct payload_info;
  5. bool elf_check(const void *payload_start, u64 payload_size);
  6. /// @brief 获取ELF文件头
  7. /// @param payload_start 文件起始地址
  8. /// @param payload_size 文件大小
  9. /// @param ehdr 返回的ELF文件头
  10. /// @return
  11. efi_status_t elf_get_header(const void *payload_start, u64 payload_size,
  12. Elf64_Ehdr **ehdr);
  13. efi_status_t load_elf(struct payload_info *payload_info);