OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
BasePeCoffLib2Internals.h
Go to the documentation of this file.
1
11#ifndef BASE_PE_COFF_LIB2_INTERNALS_H_
12#define BASE_PE_COFF_LIB2_INTERNALS_H_
13
14//
15// PcdImageLoaderRelocTypePolicy bits.
16//
17
21#define PCD_RELOC_TYPE_POLICY_ARM BIT0
22
26#define IMAGE_CERTIFICATE_ALIGN 8U
27
28//
29// The PE/COFF specification guarantees an 8 Byte alignment for certificate
30// sizes. This is larger than the alignment requirement for WIN_CERTIFICATE
31// implied by the UEFI ABI. ASSERT this holds.
32//
34 ALIGNOF (WIN_CERTIFICATE) <= IMAGE_CERTIFICATE_ALIGN,
35 "The PE/COFF specification guarantee does not suffice."
36 );
37
38//
39// The 4 Byte alignment guaranteed by the PE/COFF specification has been
40// replaced with ALIGNOF (EFI_IMAGE_BASE_RELOCATION_BLOCK) for proof simplicity.
41// This obviously was the original intention of the specification. ASSERT in
42// case the equality is not given.
43//
45 sizeof (UINT32) == ALIGNOF (EFI_IMAGE_BASE_RELOCATION_BLOCK),
46 "The current model violates the PE/COFF specification"
47 );
48
49// FIXME:
50RETURN_STATUS
52 IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *Context
53 );
54
55#endif // BASE_PE_COFF_LIB_INTERNALS_H_
STATIC_ASSERT(ALIGNOF(WIN_CERTIFICATE)<=IMAGE_CERTIFICATE_ALIGN, "The PE/COFF specification guarantee does not suffice.")
RETURN_STATUS PeCoffLoadImageInplaceNoBase(IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *Context)
#define IMAGE_CERTIFICATE_ALIGN