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