Skip to content

Commit

Permalink
[efi] Remove section alignment flags from section characteristics
Browse files Browse the repository at this point in the history
The EFI_IMAGE_SCN_ALIGN_16BYTES flags present in our section
characteristics are not recognised by some versions of Microsoft's
"link.exe" tool.  This may be causing issues with the UEFI Secure Boot
signing "process".  The error reporting mechanism of said "process"
comprises exactly one bit of information stating only that an error
has occurred, and no-one at Microsoft seems to have the faintest clue
as to what the underlying real error may be.

The section alignment flags are not required, since the section
alignment is already included within the various alignment fields in
the PE "optional" header anyway.  Remove the section alignment flags
in the blind hope that this may placate the explanatorily challenged
daemons responsible for Secure Boot signing at Microsoft.

Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
  • Loading branch information
mcb30 committed Sep 1, 2015
1 parent 1e877da commit ed186ee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/prefix.S
Expand Up @@ -164,7 +164,7 @@ coff_sections:
.long 0 /* PointerToLinenumbers */
.word 0 /* NumberOfRelocations */
.word 0 /* NumberOfLinenumbers */
.long 0xc8500080 /* Characteristics */
.long 0xc8000080 /* Characteristics */
.ascii ".payload" /* Name */
.long _payload_len /* Misc.VirtualSize */
.long ( _payload - BASE_ADDRESS ) /* VirtualAddress */
Expand All @@ -174,7 +174,7 @@ coff_sections:
.long 0 /* PointerToLinenumbers */
.word 0 /* NumberOfRelocations */
.word 0 /* NumberOfLinenumbers */
.long 0xe85000e0 /* Characteristics */
.long 0xe80000e0 /* Characteristics */
.ascii ".bss" /* Name */
.byte 0, 0, 0, 0
.long _bss_len /* Misc.VirtualSize */
Expand All @@ -185,7 +185,7 @@ coff_sections:
.long 0 /* PointerToLinenumbers */
.word 0 /* NumberOfRelocations */
.word 0 /* NumberOfLinenumbers */
.long 0xc8500080 /* Characteristics */
.long 0xc8000080 /* Characteristics */
.ascii ".reloc" /* Name */
.byte 0, 0
.long 0 /* Misc.VirtualSize */
Expand All @@ -196,7 +196,7 @@ coff_sections:
.long 0 /* PointerToLinenumbers */
.word 0 /* NumberOfRelocations */
.word 0 /* NumberOfLinenumbers */
.long 0x48500040 /* Characteristics */
.long 0x48000040 /* Characteristics */
.equ coff_sections_len, . - coff_sections
.size coff_sections, . - coff_sections

Expand Down

0 comments on commit ed186ee

Please sign in to comment.