878ddf1f |
1 | /** @file\r |
24e25d11 |
2 | Memory Only PE COFF loader\r |
878ddf1f |
3 | \r |
24e25d11 |
4 | Copyright (c) 2006, Intel Corporation \r |
5 | All rights reserved. This program and the accompanying materials \r |
6 | are licensed and made available under the terms and conditions of the BSD License \r |
7 | which accompanies this distribution. The full text of the license may be found at \r |
8 | http://opensource.org/licenses/bsd-license.php \r |
878ddf1f |
9 | \r |
24e25d11 |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r |
878ddf1f |
12 | \r |
24e25d11 |
13 | Module Name: PeCoffGetEntryPointLib.h\r |
878ddf1f |
14 | \r |
15 | **/\r |
16 | \r |
17 | #ifndef __PE_COFF_GET_ENTRY_POINT_LIB_H__\r |
18 | #define __PE_COFF_GET_ENTRY_POINT_LIB_H__\r |
19 | \r |
20 | /**\r |
24e25d11 |
21 | Retrieves and returns a pointer to the entry point to a PE/COFF image that has been loaded\r |
22 | into system memory with the PE/COFF Loader Library functions.\r |
878ddf1f |
23 | \r |
24e25d11 |
24 | Retrieves the entry point to the PE/COFF image specified by Pe32Data and returns this entry\r |
25 | point in EntryPoint. If the entry point could not be retrieved from the PE/COFF image, then\r |
26 | return RETURN_INVALID_PARAMETER. Otherwise return RETURN_SUCCESS.\r |
27 | If Pe32Data is NULL, then ASSERT().\r |
28 | If EntryPoint is NULL, then ASSERT().\r |
878ddf1f |
29 | \r |
24e25d11 |
30 | @param Pe32Data Pointer to the PE/COFF image that is loaded in system memory.\r |
31 | @param EntryPoint Pointer to entry point to the PE/COFF image to return.\r |
32 | \r |
33 | @retval RETURN_SUCCESS EntryPoint was returned.\r |
34 | @retval RETURN_INVALID_PARAMETER The entry point could not be found in the PE/COFF image.\r |
878ddf1f |
35 | \r |
36 | **/\r |
37 | RETURN_STATUS\r |
38 | EFIAPI\r |
39 | PeCoffLoaderGetEntryPoint (\r |
24e25d11 |
40 | IN VOID *Pe32Data,\r |
41 | OUT VOID **EntryPoint\r |
42 | );\r |
878ddf1f |
43 | \r |
2ce31132 |
44 | /**\r |
0d49d8f6 |
45 | Returns the machine type of a PE/COFF image.\r |
2ce31132 |
46 | \r |
0d49d8f6 |
47 | Returns the machine type from the PE/COFF image specified by Pe32Data.\r |
48 | If Pe32Data is NULL, then ASSERT().\r |
49 | \r |
50 | @param Pe32Data Pointer to the PE/COFF image that is loaded in system\r |
51 | memory.\r |
2ce31132 |
52 | \r |
0d49d8f6 |
53 | @return Machine type or zero if not a valid iamge.\r |
2ce31132 |
54 | \r |
55 | **/\r |
56 | UINT16\r |
57 | EFIAPI\r |
58 | PeCoffLoaderGetMachineType (\r |
0d49d8f6 |
59 | IN VOID *Pe32Data\r |
2ce31132 |
60 | );\r |
61 | \r |
0d49d8f6 |
62 | /**\r |
63 | Returns a pointer to the PDB file name for a PE/COFF image that has been\r |
64 | loaded into system memory with the PE/COFF Loader Library functions. \r |
65 | \r |
66 | Returns the PDB file name for the PE/COFF image specified by Pe32Data. If\r |
67 | the PE/COFF image specified by Pe32Data is not a valid, then NULL is\r |
68 | returned. If the PE/COFF image specified by Pe32Data does not contain a\r |
69 | debug directory entry, then NULL is returned. If the debug directory entry\r |
70 | in the PE/COFF image specified by Pe32Data does not contain a PDB file name,\r |
71 | then NULL is returned.\r |
72 | If Pe32Data is NULL, then ASSERT().\r |
73 | \r |
74 | @param Pe32Data Pointer to the PE/COFF image that is loaded in system\r |
75 | memory.\r |
76 | \r |
77 | @return The PDB file name for the PE/COFF image specified by Pe32Data or NULL\r |
78 | if it cannot be retrieved.\r |
79 | \r |
80 | **/\r |
81 | VOID *\r |
82 | EFIAPI\r |
83 | PeCoffLoaderGetPdbPointer (\r |
84 | IN VOID *Pe32Data\r |
85 | );\r |
2ce31132 |
86 | \r |
878ddf1f |
87 | #endif\r |