diff options
author | Steve McIntyre <steve@einval.com> | 2021-03-23 23:49:46 +0000 |
---|---|---|
committer | Steve McIntyre <steve@einval.com> | 2021-03-23 23:49:46 +0000 |
commit | 031e5cce385d3f96b1caa1d53495332a7eb03749 (patch) | |
tree | b4988dfbd191b2242b9294e24075b39a608b1155 /include/pe.h | |
parent | 7bf7a6d0852382bb645119b18df3ff461aaba247 (diff) | |
download | efi-boot-shim-upstream/15.3.tar.gz efi-boot-shim-upstream/15.3.zip |
New upstream version 15.3upstream/15.3
Diffstat (limited to 'include/pe.h')
-rw-r--r-- | include/pe.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/pe.h b/include/pe.h new file mode 100644 index 00000000..79bf440c --- /dev/null +++ b/include/pe.h @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: BSD-2-Clause-Patent +/* + * pe.h - helper functions for pe binaries. + * Copyright Peter Jones <pjones@redhat.com> + */ + +#ifndef PE_H_ +#define PE_H_ + +void * +ImageAddress (void *image, uint64_t size, uint64_t address); + +EFI_STATUS +read_header(void *data, unsigned int datasize, + PE_COFF_LOADER_IMAGE_CONTEXT *context); + +EFI_STATUS +handle_sbat(char *SBATBase, size_t SBATSize); + +EFI_STATUS +handle_image (void *data, unsigned int datasize, + EFI_LOADED_IMAGE *li, + EFI_IMAGE_ENTRY_POINT *entry_point, + EFI_PHYSICAL_ADDRESS *alloc_address, + UINTN *alloc_pages); + +EFI_STATUS +generate_hash (char *data, unsigned int datasize_in, + PE_COFF_LOADER_IMAGE_CONTEXT *context, + UINT8 *sha256hash, UINT8 *sha1hash); + +EFI_STATUS +relocate_coff (PE_COFF_LOADER_IMAGE_CONTEXT *context, + EFI_IMAGE_SECTION_HEADER *Section, + void *orig, void *data); + +#endif /* !PE_H_ */ +// vim:fenc=utf-8:tw=75:noet |