35 lines
1.0 KiB
Diff
35 lines
1.0 KiB
Diff
From b1e7f6b21c4269de87c626a7e4792ccdeed1a3c5 Mon Sep 17 00:00:00 2001
|
|
From: Matt Fleming <matt.fleming@intel.com>
|
|
Date: Mon, 23 Apr 2012 11:19:58 +0100
|
|
Subject: [PATCH] Align the .reloc section for x86-64
|
|
|
|
Like the linker scripts for other architectures, the .reloc section
|
|
needs to be aligned for x86-64. Use a 4096-byte boundary because that
|
|
seems to be the convention used everywhere else in the linker scripts.
|
|
|
|
Without this patch the .reloc section will not adhere to the alignment
|
|
value in the FileAlignment field (512 bytes by default) of the PE/COFF
|
|
header. This results in a signed executable failing to boot in a
|
|
secure boot environment.
|
|
|
|
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|
---
|
|
gnuefi/elf_x86_64_efi.lds | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/gnuefi/elf_x86_64_efi.lds b/gnuefi/elf_x86_64_efi.lds
|
|
index d188aee..32cf687 100644
|
|
--- a/gnuefi/elf_x86_64_efi.lds
|
|
+++ b/gnuefi/elf_x86_64_efi.lds
|
|
@@ -17,6 +17,7 @@ SECTIONS
|
|
{
|
|
*(.text)
|
|
}
|
|
+ . = ALIGN(4096);
|
|
.reloc :
|
|
{
|
|
*(.reloc)
|
|
--
|
|
1.7.10
|
|
|