/* $Id$ */
/** @file
* IPRT - Windows NT PE Structures and Constants.
*/
/*
* Copyright (C) 2006-2013 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* The contents of this file may alternatively be used under the terms
* of the Common Development and Distribution License Version 1.0
* (CDDL) only, as it comes in the "COPYING.CDDL" file of the
* VirtualBox OSE distribution, in which case the provisions of the
* CDDL are applicable instead of those of the GPL.
*
* You may elect to license modified versions of this file under the
* terms and conditions of either the GPL or the CDDL or both.
*/
#ifndef ___internal_ldrPE_h
#define ___internal_ldrPE_h
/*******************************************************************************
* Defined Constants And Macros *
*******************************************************************************/
/* file header */
/* optional header */
/* section header */
/* relocations */
/* imports */
/* debug dir */
/* security directory */
/** The alignment of the certificate table.
* @remarks Found thru signtool experiments. */
/* For .DBG files. */
|| (a_StorageClass) == IMAGE_SYM_CLASS_UNION_TAG \
|| (a_StorageClass) == IMAGE_SYM_CLASS_ENUM_TAG )
/*******************************************************************************
* Structures and Typedefs *
*******************************************************************************/
typedef struct _IMAGE_FILE_HEADER
{
typedef struct _IMAGE_DATA_DIRECTORY
{
typedef struct _IMAGE_OPTIONAL_HEADER32
{
typedef struct _IMAGE_OPTIONAL_HEADER64
{
typedef struct _IMAGE_NT_HEADERS
{
typedef struct _IMAGE_NT_HEADERS64
{
typedef struct _IMAGE_SECTION_HEADER
{
union
{
} Misc;
typedef struct _IMAGE_BASE_RELOCATION
{
typedef struct _IMAGE_EXPORT_DIRECTORY
{
typedef struct _IMAGE_IMPORT_DESCRIPTOR
{
union
{
} u;
typedef struct _IMAGE_IMPORT_BY_NAME
{
/* The image_thunk_data32/64 structures are not very helpful except for getting RSI. keep them around till all the code has been converted. */
typedef struct _IMAGE_THUNK_DATA64
{
union
{
} u1;
typedef struct _IMAGE_THUNK_DATA32
{
union
{
} u1;
/* WARNING! NO MORE PRAGMA PACK 4 from here on. Assert size of all new types. */
/* WARNING! NO MORE PRAGMA PACK 4 from here on. Assert size of all new types. */
/* WARNING! NO MORE PRAGMA PACK 4 from here on. Assert size of all new types. */
/* WARNING! NO MORE PRAGMA PACK 4 from here on. Assert size of all new types. */
/* WARNING! NO MORE PRAGMA PACK 4 from here on. Assert size of all new types. */
/* WARNING! NO MORE PRAGMA PACK 4 from here on. Assert size of all new types. */
/* WARNING! NO MORE PRAGMA PACK 4 from here on. Assert size of all new types. */
/* WARNING! NO MORE PRAGMA PACK 4 from here on. Assert size of all new types. */
/* WARNING! NO MORE PRAGMA PACK 4 from here on. Assert size of all new types. */
#pragma pack()
/** @since Windows 10 (preview 9879) */
typedef struct _IMAGE_LOAD_CONFIG_CODE_INTEGRITY
{
typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY32_V1
{
typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY32_V2
{
typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY32_V3
{
/** @since Windows 10 (preview 9879) */
typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY32_V4
{
/* No _IMAGE_LOAD_CONFIG_DIRECTORY64_V1 exists. */
typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY64_V2
{
typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY64_V3
{
#pragma pack()
/** @since Windows 10 (Preview (9879). */
typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY64_V4
{
typedef struct _IMAGE_DEBUG_DIRECTORY
{
typedef struct _IMAGE_DEBUG_MISC
{
typedef struct WIN_CERTIFICATE
{
/** The header of a .DBG file (NT4). */
typedef struct _IMAGE_SEPARATE_DEBUG_HEADER
{
typedef struct _IMAGE_COFF_SYMBOLS_HEADER
{
#pragma pack(2)
typedef struct _IMAGE_LINENUMBER
{
union
{
} Type;
#pragma pack()
#pragma pack(2)
typedef struct _IMAGE_SYMBOL
{
union
{
struct
{
} Name;
} N;
} IMAGE_SYMBOL;
#pragma pack()
#pragma pack(2)
typedef struct IMAGE_AUX_SYMBOL_TOKEN_DEF
{
#pragma pack()
#pragma pack(1)
typedef union _IMAGE_AUX_SYMBOL
{
struct
{
union
{
struct
{
} LnSz;
} Misc;
union
{
struct
{
} Function;
struct
{
} Array;
} FcnAry;
} Sym;
struct
{
} File;
struct
{
} Section;
struct
{
} CRC;
#pragma pack()
typedef struct _IMAGE_SYMBOL_EX
{
union
{
struct
{
} Name;
} N;
typedef union _IMAGE_AUX_SYMBOL_EX
{
struct
{
} Sym;
struct
{
} File;
struct
{
} Section;
struct
{
} CRC;
#endif