]>
Commit | Line | Data |
---|---|---|
9101c2e8 | 1 | /** @file |
2 | Specific relocation fixups for ARM architecture. | |
3 | ||
4 | Copyright (c) 2006 - 2009, Intel Corporation<BR> | |
5 | Portions copyright (c) 2008-2009 Apple Inc.<BR> | |
6 | All rights reserved. This program and the accompanying materials | |
7 | are licensed and made available under the terms and conditions of the BSD License | |
8 | which accompanies this distribution. The full text of the license may be found at | |
9 | http://opensource.org/licenses/bsd-license.php | |
10 | ||
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. | |
13 | ||
14 | **/ | |
15 | ||
16 | #include "BasePeCoffLibInternals.h" | |
17 | ||
18 | ||
19 | /** | |
20 | Performs an ARM-based specific relocation fixup and is a no-op on other | |
21 | instruction sets. | |
22 | ||
23 | @param Reloc Pointer to the relocation record. | |
24 | @param Fixup Pointer to the address to fix up. | |
25 | @param FixupData Pointer to a buffer to log the fixups. | |
26 | @param Adjust The offset to adjust the fixup. | |
27 | ||
28 | @return Status code. | |
29 | ||
30 | **/ | |
31 | RETURN_STATUS | |
32 | PeCoffLoaderRelocateImageEx ( | |
33 | IN UINT16 *Reloc, | |
34 | IN OUT CHAR8 *Fixup, | |
35 | IN OUT CHAR8 **FixupData, | |
36 | IN UINT64 Adjust | |
37 | ) | |
38 | { | |
39 | return RETURN_UNSUPPORTED; | |
40 | } | |
41 | ||
42 | /** | |
43 | Returns TRUE if the machine type of PE/COFF image is supported. Supported | |
44 | does not mean the image can be executed it means the PE/COFF loader supports | |
45 | loading and relocating of the image type. It's up to the caller to support | |
46 | the entry point. | |
47 | ||
48 | The IA32/X64 version PE/COFF loader/relocater both support IA32, X64 and EBC images. | |
49 | ||
50 | @param Machine Machine type from the PE Header. | |
51 | ||
52 | @return TRUE if this PE/COFF loader can load the image | |
53 | ||
54 | **/ | |
55 | BOOLEAN | |
56 | PeCoffLoaderImageFormatSupported ( | |
57 | IN UINT16 Machine | |
58 | ) | |
59 | { | |
60 | if ((Machine == IMAGE_FILE_MACHINE_ARMTHUMB_MIXED) || (Machine == IMAGE_FILE_MACHINE_EBC)) { | |
61 | return TRUE; | |
62 | } | |
63 | ||
64 | return FALSE; | |
65 | } | |
66 | ||
67 | /** | |
68 | Performs an ARM-based specific re-relocation fixup and is a no-op on other | |
69 | instruction sets. This is used to re-relocated the image into the EFI virtual | |
70 | space for runtime calls. | |
71 | ||
72 | @param Reloc Pointer to the relocation record. | |
73 | @param Fixup Pointer to the address to fix up. | |
74 | @param FixupData Pointer to a buffer to log the fixups. | |
75 | @param Adjust The offset to adjust the fixup. | |
76 | ||
77 | @return Status code. | |
78 | ||
79 | **/ | |
80 | RETURN_STATUS | |
81 | PeHotRelocateImageEx ( | |
82 | IN UINT16 *Reloc, | |
83 | IN OUT CHAR8 *Fixup, | |
84 | IN OUT CHAR8 **FixupData, | |
85 | IN UINT64 Adjust | |
86 | ) | |
87 | { | |
88 | return RETURN_UNSUPPORTED; | |
89 | } | |
90 |