]>
git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Library/PeCoffGetEntryPointLib.h
2 Provides a service to retrieve the PE/COFF entry point from a PE/COFF image.
4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #ifndef __PE_COFF_GET_ENTRY_POINT_LIB_H__
10 #define __PE_COFF_GET_ENTRY_POINT_LIB_H__
13 Retrieves and returns a pointer to the entry point to a PE/COFF image that has been loaded
14 into system memory with the PE/COFF Loader Library functions.
16 Retrieves the entry point to the PE/COFF image specified by Pe32Data and returns this entry
17 point in EntryPoint. If the entry point could not be retrieved from the PE/COFF image, then
18 return RETURN_INVALID_PARAMETER. Otherwise return RETURN_SUCCESS.
19 If Pe32Data is NULL, then ASSERT().
20 If EntryPoint is NULL, then ASSERT().
22 @param Pe32Data The pointer to the PE/COFF image that is loaded in system memory.
23 @param EntryPoint The pointer to entry point to the PE/COFF image to return.
25 @retval RETURN_SUCCESS EntryPoint was returned.
26 @retval RETURN_INVALID_PARAMETER The entry point could not be found in the PE/COFF image.
31 PeCoffLoaderGetEntryPoint (
37 Returns the machine type of a PE/COFF image.
39 Returns the machine type from the PE/COFF image specified by Pe32Data.
40 If Pe32Data is NULL, then ASSERT().
42 @param Pe32Data The pointer to the PE/COFF image that is loaded in system
45 @return Machine type or zero if not a valid image.
50 PeCoffLoaderGetMachineType (
55 Returns a pointer to the PDB file name for a PE/COFF image that has been
56 loaded into system memory with the PE/COFF Loader Library functions.
58 Returns the PDB file name for the PE/COFF image specified by Pe32Data. If
59 the PE/COFF image specified by Pe32Data is not a valid, then NULL is
60 returned. If the PE/COFF image specified by Pe32Data does not contain a
61 debug directory entry, then NULL is returned. If the debug directory entry
62 in the PE/COFF image specified by Pe32Data does not contain a PDB file name,
63 then NULL is returned.
64 If Pe32Data is NULL, then ASSERT().
66 @param Pe32Data The pointer to the PE/COFF image that is loaded in system
69 @return The PDB file name for the PE/COFF image specified by Pe32Data, or NULL
70 if it cannot be retrieved.
75 PeCoffLoaderGetPdbPointer (
81 Returns the size of the PE/COFF headers
83 Returns the size of the PE/COFF header specified by Pe32Data.
84 If Pe32Data is NULL, then ASSERT().
86 @param Pe32Data The pointer to the PE/COFF image that is loaded in system
89 @return Size of PE/COFF header in bytes, or zero if not a valid image.
94 PeCoffGetSizeOfHeaders (
99 Returns PE/COFF image base specified by the address in this PE/COFF image.
101 On DEBUG build, searches the PE/COFF image base forward the address in this
102 PE/COFF image and returns it.
104 @param Address Address located in one PE/COFF image.
106 @retval 0 RELEASE build or cannot find the PE/COFF image base.
107 @retval others PE/COFF image base found.
112 PeCoffSearchImageBase (