https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
		
			
				
	
	
		
			82 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			82 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
| /** @file
 | |
| Header file for Elf convert solution
 | |
| 
 | |
| Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
 | |
| 
 | |
| SPDX-License-Identifier: BSD-2-Clause-Patent
 | |
| 
 | |
| **/
 | |
| 
 | |
| #ifndef _ELF_CONVERT_H_
 | |
| #define _ELF_CONVERT_H_
 | |
| 
 | |
| #include "elf_common.h"
 | |
| #include "elf32.h"
 | |
| #include "elf64.h"
 | |
| 
 | |
| //
 | |
| // Externally defined variables
 | |
| //
 | |
| extern UINT32 mCoffOffset;
 | |
| extern CHAR8  *mInImageName;
 | |
| extern UINT32 mImageTimeStamp;
 | |
| extern UINT8  *mCoffFile;
 | |
| extern UINT32 mTableOffset;
 | |
| extern UINT32 mOutImageType;
 | |
| extern UINT32 mFileBufferSize;
 | |
| 
 | |
| //
 | |
| // Common EFI specific data.
 | |
| //
 | |
| #define ELF_HII_SECTION_NAME ".hii"
 | |
| #define ELF_STRTAB_SECTION_NAME ".strtab"
 | |
| #define MAX_COFF_ALIGNMENT 0x10000
 | |
| 
 | |
| //
 | |
| // Filter Types
 | |
| //
 | |
| typedef enum {
 | |
|   SECTION_TEXT,
 | |
|   SECTION_HII,
 | |
|   SECTION_DATA
 | |
| 
 | |
| } SECTION_FILTER_TYPES;
 | |
| 
 | |
| //
 | |
| // FunctionTable
 | |
| //
 | |
| typedef struct {
 | |
|   VOID    (*ScanSections) ();
 | |
|   BOOLEAN (*WriteSections) (SECTION_FILTER_TYPES  FilterType);
 | |
|   VOID    (*WriteRelocations) ();
 | |
|   VOID    (*WriteDebug) ();
 | |
|   VOID    (*SetImageSize) ();
 | |
|   VOID    (*CleanUp) ();
 | |
| 
 | |
| } ELF_FUNCTION_TABLE;
 | |
| 
 | |
| //
 | |
| // Common functions
 | |
| //
 | |
| VOID
 | |
| CoffAddFixup (
 | |
|   UINT32 Offset,
 | |
|   UINT8  Type
 | |
|   );
 | |
| 
 | |
| VOID
 | |
| CoffAddFixupEntry (
 | |
|   UINT16 Val
 | |
|   );
 | |
| 
 | |
| 
 | |
| VOID
 | |
| CreateSectionHeader (
 | |
|   const CHAR8 *Name,
 | |
|   UINT32      Offset,
 | |
|   UINT32      Size,
 | |
|   UINT32      Flags
 | |
|   );
 | |
| 
 | |
| #endif
 |