summaryrefslogtreecommitdiff
path: root/EDK/Foundation/Include/Ebc/EfiPeOptionalHeader.h
blob: c6efb1a4f74c2d93f83055be1821ede9143e3361 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*++

Copyright (c) 2004 - 2006, 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:

  EfiPeOptionalHeader.h

Abstract:
  Defines the optional header in the PE image per the PE specification.  This
  file must be included only from within EfiImage.h since 
  EFI_IMAGE_DATA_DIRECTORY and EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES are defined
  there.

--*/

#ifndef _EFI_PE_OPTIONAL_HEADER_H_
#define _EFI_PE_OPTIONAL_HEADER_H_

//
// This is just to make sure you can cross compile with the EBC compiiler.
// It does not make sense to have a PE loader coded in EBC. You need to 
// understand the basic 
//
#define EFI_IMAGE_MACHINE_TYPE (EFI_IMAGE_MACHINE_EBC)

#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_EBC)

#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) 

//
// BUGBUG: Is this the correct magic for EBC?
//
#define EFI_IMAGE_NT_OPTIONAL_HDR_MAGIC EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC

typedef EFI_IMAGE_OPTIONAL_HEADER32 EFI_IMAGE_OPTIONAL_HEADER;
typedef EFI_IMAGE_NT_HEADERS32      EFI_IMAGE_NT_HEADERS;

#endif