mirror of
https://github.com/acidanthera/audk.git
synced 2025-09-26 11:08:42 +02:00
34 lines
635 B
C
34 lines
635 B
C
/** @file
|
|
Copyright (c) 2023, Marvin Häuser. All rights reserved.
|
|
SPDX-License-Identifier: BSD-3-Clause
|
|
**/
|
|
|
|
#include "PeEmitCommon.h"
|
|
|
|
void *
|
|
ToolImageEmitPe (
|
|
const image_tool_image_info_t *Image,
|
|
uint32_t *FileSize
|
|
)
|
|
{
|
|
switch (Image->HeaderInfo.Machine) {
|
|
case IMAGE_FILE_MACHINE_I386:
|
|
case IMAGE_FILE_MACHINE_ARMTHUMB_MIXED:
|
|
{
|
|
return ToolImageEmitPe32 (Image, FileSize);
|
|
}
|
|
|
|
case IMAGE_FILE_MACHINE_X64:
|
|
case IMAGE_FILE_MACHINE_ARM64:
|
|
{
|
|
return ToolImageEmitPe64 (Image, FileSize);
|
|
}
|
|
|
|
default:
|
|
{
|
|
assert (false);
|
|
}
|
|
}
|
|
|
|
return NULL;
|
|
} |