diff options
Diffstat (limited to 'UefiPayloadPkg/PayloadLoaderPeim/ElfLib.h')
-rw-r--r-- | UefiPayloadPkg/PayloadLoaderPeim/ElfLib.h | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib.h b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib.h index 9cfc2912cf..f8460edb36 100644 --- a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib.h +++ b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib.h @@ -11,35 +11,34 @@ #include <PiPei.h>
-#define ELF_CLASS32 1
-#define ELF_CLASS64 2
+#define ELF_CLASS32 1
+#define ELF_CLASS64 2
-#define ELF_PT_LOAD 1
+#define ELF_PT_LOAD 1
typedef struct {
- RETURN_STATUS ParseStatus; ///< Return the status after ParseElfImage().
- UINT8 *FileBase; ///< The source location in memory.
- UINTN FileSize; ///< The size including sections that don't require loading.
- UINT8 *PreferredImageAddress; ///< The preferred image to be loaded. No relocation is needed if loaded to this address.
- BOOLEAN ReloadRequired; ///< The image needs a new memory location for running.
- UINT8 *ImageAddress; ///< The destination memory address set by caller.
- UINTN ImageSize; ///< The memory size for loading and execution.
- UINT32 EiClass;
- UINT32 ShNum;
- UINT32 PhNum;
- UINTN ShStrOff;
- UINTN ShStrLen;
- UINTN EntryPoint; ///< Return the actual entry point after LoadElfImage().
+ RETURN_STATUS ParseStatus; ///< Return the status after ParseElfImage().
+ UINT8 *FileBase; ///< The source location in memory.
+ UINTN FileSize; ///< The size including sections that don't require loading.
+ UINT8 *PreferredImageAddress; ///< The preferred image to be loaded. No relocation is needed if loaded to this address.
+ BOOLEAN ReloadRequired; ///< The image needs a new memory location for running.
+ UINT8 *ImageAddress; ///< The destination memory address set by caller.
+ UINTN ImageSize; ///< The memory size for loading and execution.
+ UINT32 EiClass;
+ UINT32 ShNum;
+ UINT32 PhNum;
+ UINTN ShStrOff;
+ UINTN ShStrLen;
+ UINTN EntryPoint; ///< Return the actual entry point after LoadElfImage().
} ELF_IMAGE_CONTEXT;
-
typedef struct {
- UINT32 PtType;
- UINTN Offset;
- UINTN Length;
- UINTN MemLen;
- UINTN MemAddr;
- UINTN Alignment;
+ UINT32 PtType;
+ UINTN Offset;
+ UINTN Length;
+ UINTN MemLen;
+ UINTN MemAddr;
+ UINTN Alignment;
} SEGMENT_INFO;
/**
@@ -56,8 +55,8 @@ typedef struct { EFI_STATUS
EFIAPI
ParseElfImage (
- IN VOID *ImageBase,
- OUT ELF_IMAGE_CONTEXT *ElfCt
+ IN VOID *ImageBase,
+ OUT ELF_IMAGE_CONTEXT *ElfCt
);
/**
@@ -76,7 +75,7 @@ ParseElfImage ( EFI_STATUS
EFIAPI
LoadElfImage (
- IN ELF_IMAGE_CONTEXT *ElfCt
+ IN ELF_IMAGE_CONTEXT *ElfCt
);
/**
@@ -93,9 +92,9 @@ LoadElfImage ( EFI_STATUS
EFIAPI
GetElfSectionName (
- IN ELF_IMAGE_CONTEXT *ElfCt,
- IN UINT32 SectionIndex,
- OUT CHAR8 **SectionName
+ IN ELF_IMAGE_CONTEXT *ElfCt,
+ IN UINT32 SectionIndex,
+ OUT CHAR8 **SectionName
);
/**
@@ -114,9 +113,10 @@ GetElfSectionName ( EFI_STATUS
EFIAPI
GetElfSectionPos (
- IN ELF_IMAGE_CONTEXT *ElfCt,
- IN UINT32 Index,
- OUT UINTN *Offset,
- OUT UINTN *Size
+ IN ELF_IMAGE_CONTEXT *ElfCt,
+ IN UINT32 Index,
+ OUT UINTN *Offset,
+ OUT UINTN *Size
);
+
#endif /* ELF_LIB_H_ */
|