]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/Source/C/GenFw/ElfConvert.h
Fix the typo for the structure definition of EFI_ADAPTER_INFO_NETWORK_BOOT in Adapter...
[mirror_edk2.git] / BaseTools / Source / C / GenFw / ElfConvert.h
CommitLineData
40d841f6
LG
1/** @file
2
da92f276 3Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
40d841f6
LG
4
5This program and the accompanying materials are licensed and made available
6under the terms and conditions of the BSD License which accompanies this
7distribution. The full text of the license may be found at
8http://opensource.org/licenses/bsd-license.php
9
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13**/
14
15#ifndef _ELF_CONVERT_H_
16#define _ELF_CONVERT_H_
17
18#include "elf_common.h"
19#include "elf32.h"
20#include "elf64.h"
21
22//
23// Externally defined variables
24//
25extern UINT32 mCoffOffset;
26extern CHAR8 *mInImageName;
27extern UINT32 mImageTimeStamp;
28extern UINT8 *mCoffFile;
29extern UINT32 mTableOffset;
da92f276 30extern UINT32 mOutImageType;
40d841f6
LG
31
32//
33// Common EFI specific data.
34//
35#define ELF_HII_SECTION_NAME ".hii"
36
37//
38// Filter Types
39//
40typedef enum {
41 SECTION_TEXT,
42 SECTION_HII,
43 SECTION_DATA
44
45} SECTION_FILTER_TYPES;
46
47//
48// FunctionTalbe
49//
50typedef struct {
51 VOID (*ScanSections) ();
52 BOOLEAN (*WriteSections) (SECTION_FILTER_TYPES FilterType);
53 VOID (*WriteRelocations) ();
54 VOID (*WriteDebug) ();
55 VOID (*SetImageSize) ();
56 VOID (*CleanUp) ();
57
58} ELF_FUNCTION_TABLE;
59
60//
61// Common functions
62//
63VOID
64CoffAddFixup (
65 UINT32 Offset,
66 UINT8 Type
67 );
68
69VOID
70CoffAddFixupEntry (
71 UINT16 Val
72 );
73
74
75VOID
76CreateSectionHeader (
77 const CHAR8 *Name,
78 UINT32 Offset,
79 UINT32 Size,
80 UINT32 Flags
81 );
82
83#endif