fb3df220 |
1 | /** @file\r |
2 | Memory Only PE COFF loader\r |
3 | \r |
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 |
9 | \r |
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 |
12 | \r |
fb3df220 |
13 | **/\r |
14 | \r |
15 | #ifndef __PE_COFF_GET_ENTRY_POINT_LIB_H__\r |
16 | #define __PE_COFF_GET_ENTRY_POINT_LIB_H__\r |
17 | \r |
18 | /**\r |
19 | Retrieves and returns a pointer to the entry point to a PE/COFF image that has been loaded\r |
20 | into system memory with the PE/COFF Loader Library functions.\r |
21 | \r |
22 | Retrieves the entry point to the PE/COFF image specified by Pe32Data and returns this entry\r |
23 | point in EntryPoint. If the entry point could not be retrieved from the PE/COFF image, then\r |
24 | return RETURN_INVALID_PARAMETER. Otherwise return RETURN_SUCCESS.\r |
25 | If Pe32Data is NULL, then ASSERT().\r |
26 | If EntryPoint is NULL, then ASSERT().\r |
27 | \r |
28 | @param Pe32Data Pointer to the PE/COFF image that is loaded in system memory.\r |
29 | @param EntryPoint Pointer to entry point to the PE/COFF image to return.\r |
30 | \r |
31 | @retval RETURN_SUCCESS EntryPoint was returned.\r |
32 | @retval RETURN_INVALID_PARAMETER The entry point could not be found in the PE/COFF image.\r |
33 | \r |
34 | **/\r |
35 | RETURN_STATUS\r |
36 | EFIAPI\r |
37 | PeCoffLoaderGetEntryPoint (\r |
38 | IN VOID *Pe32Data,\r |
39 | OUT VOID **EntryPoint\r |
40 | );\r |
41 | \r |
42 | /**\r |
43 | Returns the machine type of a PE/COFF image.\r |
44 | \r |
45 | Returns the machine type from the PE/COFF image specified by Pe32Data.\r |
46 | If Pe32Data is NULL, then ASSERT().\r |
47 | \r |
48 | @param Pe32Data Pointer to the PE/COFF image that is loaded in system\r |
49 | memory.\r |
50 | \r |
51 | @return Machine type or zero if not a valid iamge.\r |
52 | \r |
53 | **/\r |
54 | UINT16\r |
55 | EFIAPI\r |
56 | PeCoffLoaderGetMachineType (\r |
57 | IN VOID *Pe32Data\r |
58 | );\r |
59 | \r |
60 | /**\r |
61 | Returns a pointer to the PDB file name for a PE/COFF image that has been\r |
62 | loaded into system memory with the PE/COFF Loader Library functions. \r |
63 | \r |
64 | Returns the PDB file name for the PE/COFF image specified by Pe32Data. If\r |
65 | the PE/COFF image specified by Pe32Data is not a valid, then NULL is\r |
66 | returned. If the PE/COFF image specified by Pe32Data does not contain a\r |
67 | debug directory entry, then NULL is returned. If the debug directory entry\r |
68 | in the PE/COFF image specified by Pe32Data does not contain a PDB file name,\r |
69 | then NULL is returned.\r |
70 | If Pe32Data is NULL, then ASSERT().\r |
71 | \r |
72 | @param Pe32Data Pointer to the PE/COFF image that is loaded in system\r |
73 | memory.\r |
74 | \r |
75 | @return The PDB file name for the PE/COFF image specified by Pe32Data or NULL\r |
76 | if it cannot be retrieved.\r |
77 | \r |
78 | **/\r |
79 | VOID *\r |
80 | EFIAPI\r |
81 | PeCoffLoaderGetPdbPointer (\r |
82 | IN VOID *Pe32Data\r |
83 | );\r |
84 | \r |
85 | #endif\r |