]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/Source/C/Common/BinderFuncs.c
BaseTools/GenFw: Add X64 GOTPCREL Support to GenFw
[mirror_edk2.git] / BaseTools / Source / C / Common / BinderFuncs.c
CommitLineData
30fdf114 1/** @file\r
97fa0ee9 2Binder function implementations for ANSI C libraries.\r
30fdf114 3\r
97fa0ee9 4Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>\r
40d841f6 5This program and the accompanying materials\r
30fdf114
LG
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
30fdf114
LG
13**/\r
14\r
15#include "BinderFuncs.h"\r
16#include "CommonLib.h"\r
17#include <stdlib.h>\r
18#include <string.h>\r
19\r
20//\r
21// Binder Function Implementations\r
22//\r
23\r
24VOID *\r
25CommonLibBinderAllocate (\r
26 IN UINTN Size\r
27 )\r
28{\r
29 return (VOID *) malloc (Size);\r
30}\r
31\r
32VOID\r
33CommonLibBinderFree (\r
34 IN VOID *Pointer\r
35 )\r
36{\r
37 free (Pointer);\r
38}\r
39\r
40VOID\r
41CommonLibBinderCopyMem (\r
42 IN VOID *Destination,\r
43 IN VOID *Source,\r
44 IN UINTN Length\r
45 )\r
46{\r
47 memmove (Destination, Source, Length);\r
48}\r
49\r
50VOID\r
51CommonLibBinderSetMem (\r
52 IN VOID *Destination,\r
53 IN UINTN Length,\r
54 IN UINT8 Value\r
55 )\r
56{\r
57 memset (Destination, Value, Length);\r
58}\r
59\r
60INTN\r
61CommonLibBinderCompareMem (\r
62 IN VOID *MemOne,\r
63 IN VOID *MemTwo,\r
64 IN UINTN Length\r
65 )\r
66{\r
67 return memcmp (MemOne, MemTwo, Length);\r
68}\r
69\r
70BOOLEAN\r
71CommonLibBinderCompareGuid (\r
72 IN EFI_GUID *Guid1,\r
73 IN EFI_GUID *Guid2\r
74 )\r
75{\r
76 return CompareGuid (Guid1, Guid2) ? FALSE : TRUE;\r
77}\r
78\r
79\r
80\r