]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/Source/C/GenFw/ElfConvert.h
Fix build error.
[mirror_edk2.git] / BaseTools / Source / C / GenFw / ElfConvert.h
CommitLineData
40d841f6
LG
1/** @file
2
3Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
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;
30
31//
32// Common EFI specific data.
33//
34#define ELF_HII_SECTION_NAME ".hii"
35
36//
37// Filter Types
38//
39typedef enum {
40 SECTION_TEXT,
41 SECTION_HII,
42 SECTION_DATA
43
44} SECTION_FILTER_TYPES;
45
46//
47// FunctionTalbe
48//
49typedef struct {
50 VOID (*ScanSections) ();
51 BOOLEAN (*WriteSections) (SECTION_FILTER_TYPES FilterType);
52 VOID (*WriteRelocations) ();
53 VOID (*WriteDebug) ();
54 VOID (*SetImageSize) ();
55 VOID (*CleanUp) ();
56
57} ELF_FUNCTION_TABLE;
58
59//
60// Common functions
61//
62VOID
63CoffAddFixup (
64 UINT32 Offset,
65 UINT8 Type
66 );
67
68VOID
69CoffAddFixupEntry (
70 UINT16 Val
71 );
72
73
74VOID
75CreateSectionHeader (
76 const CHAR8 *Name,
77 UINT32 Offset,
78 UINT32 Size,
79 UINT32 Flags
80 );
81
82#endif