File: pecoff.h

package info (click to toggle)
efitools 1.9.2-3.6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 948 kB
  • sloc: ansic: 7,550; makefile: 131; perl: 119; sh: 35
file content (29 lines) | stat: -rw-r--r-- 785 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <PeImage.h>

EFI_STATUS
pecoff_read_header(PE_COFF_LOADER_IMAGE_CONTEXT *context, void *data,
		   UINTN size);
EFI_STATUS
pecoff_relocate(PE_COFF_LOADER_IMAGE_CONTEXT *context, void **data);
EFI_STATUS
pecoff_image_layout(PE_COFF_LOADER_IMAGE_CONTEXT *context, void **data);
EFI_STATUS
pecoff_execute_checked(EFI_HANDLE image, EFI_SYSTEM_TABLE *systab,
		       CHAR16 *name);
EFI_STATUS
pecoff_execute_image(EFI_FILE *file, CHAR16 *name, EFI_HANDLE image,
		     EFI_SYSTEM_TABLE *systab);

EFI_STATUS
pecoff_get_signature(PE_COFF_LOADER_IMAGE_CONTEXT *context, void *buffer,
		     WIN_CERTIFICATE **data, int signum);


static inline void*
pecoff_image_address(void *image, int size, unsigned int address)
{
	if (address > size)
		return NULL;

	return image + address;
}