mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-05-02 18:17:50 -04:00
include: pe.h: Fix PE definitions
* Rename constants to their standard PE names: - MZ_MAGIC -> IMAGE_DOS_SIGNATURE - PE_MAGIC -> IMAGE_NT_SIGNATURE - PE_OPT_MAGIC_PE32_ROM -> IMAGE_ROM_OPTIONAL_HDR_MAGIC - PE_OPT_MAGIC_PE32 -> IMAGE_NT_OPTIONAL_HDR32_MAGIC - PE_OPT_MAGIC_PE32PLUS -> IMAGE_NT_OPTIONAL_HDR64_MAGIC - IMAGE_DLL_CHARACTERISTICS_NX_COMPAT -> IMAGE_DLLCHARACTERISTICS_NX_COMPAT * Import constants and their description from readpe and file projects which contains current up-to-date information: - IMAGE_FILE_MACHINE_* - IMAGE_FILE_* - IMAGE_SUBSYSTEM_* - IMAGE_DLLCHARACTERISTICS_* - IMAGE_DLLCHARACTERISTICS_EX_* - IMAGE_DEBUG_TYPE_* * Add missing IMAGE_SCN_* constants and update their incorrect description * Fix incorrect value of IMAGE_SCN_MEM_PURGEABLE constant * Add description for win32_version and loader_flags PE fields Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
committed by
Ard Biesheuvel
parent
3dcb524d78
commit
46550e2b87
@@ -43,7 +43,7 @@ SYSSEG = 0x1000 /* historical load address >> 4 */
|
||||
.section ".bstext", "ax"
|
||||
#ifdef CONFIG_EFI_STUB
|
||||
# "MZ", MS-DOS header
|
||||
.word MZ_MAGIC
|
||||
.word IMAGE_DOS_SIGNATURE
|
||||
.org 0x38
|
||||
#
|
||||
# Offset to the PE header.
|
||||
@@ -51,16 +51,16 @@ SYSSEG = 0x1000 /* historical load address >> 4 */
|
||||
.long LINUX_PE_MAGIC
|
||||
.long pe_header
|
||||
pe_header:
|
||||
.long PE_MAGIC
|
||||
.long IMAGE_NT_SIGNATURE
|
||||
|
||||
coff_header:
|
||||
#ifdef CONFIG_X86_32
|
||||
.set image_file_add_flags, IMAGE_FILE_32BIT_MACHINE
|
||||
.set pe_opt_magic, PE_OPT_MAGIC_PE32
|
||||
.set pe_opt_magic, IMAGE_NT_OPTIONAL_HDR32_MAGIC
|
||||
.word IMAGE_FILE_MACHINE_I386
|
||||
#else
|
||||
.set image_file_add_flags, 0
|
||||
.set pe_opt_magic, PE_OPT_MAGIC_PE32PLUS
|
||||
.set pe_opt_magic, IMAGE_NT_OPTIONAL_HDR64_MAGIC
|
||||
.word IMAGE_FILE_MACHINE_AMD64
|
||||
#endif
|
||||
.word section_count # nr_sections
|
||||
@@ -111,7 +111,7 @@ extra_header_fields:
|
||||
.long salign # SizeOfHeaders
|
||||
.long 0 # CheckSum
|
||||
.word IMAGE_SUBSYSTEM_EFI_APPLICATION # Subsystem (EFI application)
|
||||
.word IMAGE_DLL_CHARACTERISTICS_NX_COMPAT # DllCharacteristics
|
||||
.word IMAGE_DLLCHARACTERISTICS_NX_COMPAT # DllCharacteristics
|
||||
#ifdef CONFIG_X86_32
|
||||
.long 0 # SizeOfStackReserve
|
||||
.long 0 # SizeOfStackCommit
|
||||
|
||||
Reference in New Issue
Block a user