EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index
Functions

Nt32Pkg/Library/Nt32PeiPeCoffGetEntryPointLib/PeCoffGetEntryPoint.c File Reference

#include <PiPei.h>
#include <IndustryStandard/PeImage.h>
#include <WinNtPeim.h>
#include <Ppi/NtPeiLoadFile.h>
#include <Library/PeCoffGetEntryPointLib.h>
#include <Library/PeiServicesLib.h>
#include <Library/DebugLib.h>

Go to the source code of this file.

Functions

RETURN_STATUS EFIAPI PeCoffLoaderGetEntryPoint (IN VOID *Pe32Data, IN OUT VOID **EntryPoint)
UINT16 EFIAPI PeCoffLoaderGetMachineType (IN VOID *Pe32Data)
VOID *EFIAPI PeCoffLoaderGetPdbPointer (IN VOID *Pe32Data)
UINT32 EFIAPI PeCoffGetSizeOfHeaders (IN VOID *Pe32Data)

Detailed Description

Copyright (c) 2006 - 2010, Intel Corporation. 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.

Module Name:

PeCoffGetEntryPoint.c

Abstract:

Tiano PE/COFF loader

Revision History

Definition in file PeCoffGetEntryPoint.c.


Function Documentation

UINT32 EFIAPI PeCoffGetSizeOfHeaders ( IN VOID *  Pe32Data)

Returns the size of the PE/COFF headers

Returns the size of the PE/COFF header specified by Pe32Data. If Pe32Data is NULL, then ASSERT().

Parameters:
Pe32DataPointer to the PE/COFF image that is loaded in system memory.
Returns:
Size of PE/COFF header in bytes or zero if not a valid image.

Definition at line 291 of file PeCoffGetEntryPoint.c.

RETURN_STATUS EFIAPI PeCoffLoaderGetEntryPoint ( IN VOID *  Pe32Data,
IN OUT VOID **  EntryPoint 
)

Definition at line 35 of file PeCoffGetEntryPoint.c.

UINT16 EFIAPI PeCoffLoaderGetMachineType ( IN VOID *  Pe32Data)

Returns the machine type of PE/COFF image. This is copied from MDE BasePeCoffGetEntryPointLib, the code should be sync with it. The reason is NT32 package needs to load the image to memory to support source level debug.

Parameters:
Pe32DataPointer to a PE/COFF header
Returns:
Machine type or zero if not a valid iamge

Definition at line 106 of file PeCoffGetEntryPoint.c.

VOID* EFIAPI PeCoffLoaderGetPdbPointer ( IN VOID *  Pe32Data)

Returns a pointer to the PDB file name for a PE/COFF image that has been loaded into system memory with the PE/COFF Loader Library functions.

Returns the PDB file name for the PE/COFF image specified by Pe32Data. If the PE/COFF image specified by Pe32Data is not a valid, then NULL is returned. If the PE/COFF image specified by Pe32Data does not contain a debug directory entry, then NULL is returned. If the debug directory entry in the PE/COFF image specified by Pe32Data does not contain a PDB file name, then NULL is returned. If Pe32Data is NULL, then ASSERT().

Parameters:
Pe32DataPointer to the PE/COFF image that is loaded in system memory.
Returns:
The PDB file name for the PE/COFF image specified by Pe32Data or NULL if it cannot be retrieved.

Definition at line 158 of file PeCoffGetEntryPoint.c.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines