#include <Uefi.h>
#include <IndustryStandard/AppleMachoImage.h>
#include <IndustryStandard/AppleFatBinaryImage.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/BaseOverflowLib.h>
#include <Library/DebugLib.h>
#include <Library/OcMachoLib.h>
#include "OcMachoLibInternal.h"
Go to the source code of this file.
Functions | |
EFI_STATUS | FatGetArchitectureOffset (IN CONST UINT8 *Buffer, IN UINT32 BufferSize, IN UINT32 FullSize, IN MACH_CPU_TYPE CpuType, OUT UINT32 *FatOffset, OUT UINT32 *FatSize) |
EFI_STATUS | FatFilterArchitectureByType (IN OUT UINT8 **FileData, IN OUT UINT32 *FileSize, IN MACH_CPU_TYPE CpuType) |
EFI_STATUS | FatFilterArchitecture32 (IN OUT UINT8 **FileData, IN OUT UINT32 *FileSize) |
EFI_STATUS | FatFilterArchitecture64 (IN OUT UINT8 **FileData, IN OUT UINT32 *FileSize) |
Copyright (C) 2020, Goldfish64. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Definition in file MachoFat.c.
EFI_STATUS FatFilterArchitecture32 | ( | IN OUT UINT8 ** | FileData, |
IN OUT UINT32 * | FileSize ) |
Moves file pointer and size to point to x86 slice in case FAT Mach-O is used.
[in,out] | FileData | Pointer to pointer of the file's data. |
[in,out] | FileSize | Pointer to file size of FileData. |
Definition at line 142 of file MachoFat.c.
EFI_STATUS FatFilterArchitecture64 | ( | IN OUT UINT8 ** | FileData, |
IN OUT UINT32 * | FileSize ) |
Moves file pointer and size to point to x86_64 slice in case FAT Mach-O is used.
[in,out] | FileData | Pointer to pointer of the file's data. |
[in,out] | FileSize | Pointer to file size of FileData. |
Definition at line 151 of file MachoFat.c.
EFI_STATUS FatFilterArchitectureByType | ( | IN OUT UINT8 ** | FileData, |
IN OUT UINT32 * | FileSize, | ||
IN MACH_CPU_TYPE | CpuType ) |
Moves file pointer and size to point to specified slice in case FAT Mach-O is used.
[in,out] | FileData | Pointer to pointer of the file's data. |
[in,out] | FileSize | Pointer to file size of FileData. |
[in] | CpuType | Desired CPU slice to use. |
Definition at line 116 of file MachoFat.c.
EFI_STATUS FatGetArchitectureOffset | ( | IN CONST UINT8 * | Buffer, |
IN UINT32 | BufferSize, | ||
IN UINT32 | FullSize, | ||
IN MACH_CPU_TYPE | CpuType, | ||
OUT UINT32 * | FatOffset, | ||
OUT UINT32 * | FatSize ) |
Returns offset and size of specified slice in case FAT Mach-O is used. If no FAT is detected, FatOffset and FatSize are set to 0 and FullSize respectively.
[in] | Buffer | Pointer to the buffer data. |
[in] | BufferSize | Size of Buffer. |
[in] | FullSize | Full file size, used to validate sizes within FAT structure. |
[in] | CpuType | Desired CPU slice to use. |
[out] | FatOffset | Pointer to offset of FAT slice. |
[out] | FatSize | Pointer to size of FAT slice. |
Definition at line 27 of file MachoFat.c.