]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
arm64: efi: remove forbidden values from the PE/COFF header
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 23 Mar 2017 19:00:48 +0000 (19:00 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 4 Apr 2017 16:50:34 +0000 (17:50 +0100)
Bring the PE/COFF header in line with the PE/COFF spec, by setting
NumberOfSymbols to 0, and removing the section alignment flags.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/efi-header.S

index 9b24ce130afb08dc556d64fbfaca2d4c13ef7f96..515624bbfcd0125bdd6988c067cbaccb42f60384 100644 (file)
@@ -15,7 +15,7 @@ coff_header:
        .short  2                                       // nr_sections
        .long   0                                       // TimeDateStamp
        .long   0                                       // PointerToSymbolTable
-       .long   1                                       // NumberOfSymbols
+       .long   0                                       // NumberOfSymbols
        .short  section_table - optional_header         // SizeOfOptionalHeader
        .short  0x206                                   // Characteristics.
                                                        // IMAGE_FILE_DEBUG_STRIPPED |
@@ -88,7 +88,7 @@ section_table:
        .long   0                                       // PointerToLineNumbers
        .short  0                                       // NumberOfRelocations
        .short  0                                       // NumberOfLineNumbers
-       .long   0x42100040                              // Characteristics (section flags)
+       .long   0x42000040                              // Characteristics (section flags)
 
 
        .ascii  ".text"
@@ -104,7 +104,7 @@ section_table:
        .long   0                                       // PointerToLineNumbers
        .short  0                                       // NumberOfRelocations
        .short  0                                       // NumberOfLineNumbers
-       .long   0xe0500020                              // Characteristics
+       .long   0xe0000020                              // Characteristics
 
 #ifdef CONFIG_DEBUG_EFI
        /*