* [tip:x86/efi] x86, efi: Fix issue of overlapping . reloc section for EFI_STUB
[not found] <1332520506-6472-2-git-send-email-jordan.l.justen@intel.com>
@ 2012-03-26 22:19 ` tip-bot for Jordan Justen
0 siblings, 0 replies; only message in thread
From: tip-bot for Jordan Justen @ 2012-03-26 22:19 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, jordan.l.justen, tglx, hpa,
matt.fleming
Commit-ID: 2e064b1e131eba262c0ba4268cb79dbc72edeece
Gitweb: http://git.kernel.org/tip/2e064b1e131eba262c0ba4268cb79dbc72edeece
Author: Jordan Justen <jordan.l.justen@intel.com>
AuthorDate: Fri, 23 Mar 2012 09:35:04 -0700
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Mon, 26 Mar 2012 13:08:33 -0700
x86, efi: Fix issue of overlapping .reloc section for EFI_STUB
Previously the .reloc section was embedded in the .text
section.
No relocations are required during the PE/COFF loading phase
for the kernel using the EFI_STUB UEFI loader. To fix the
issue of overlapping sections, create a .reloc section with a
zero length.
The .reloc section header must exist to make sure the image
will be loaded by the UEFI firmware, but a zero-length
section header seems to be sufficient.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Link: http://lkml.kernel.org/r/1332520506-6472-2-git-send-email-jordan.l.justen@intel.com
Acked-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
| 22 +++++++---------------
1 files changed, 7 insertions(+), 15 deletions(-)
--git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
index f1bbeeb..4e9124b 100644
--- a/arch/x86/boot/header.S
+++ b/arch/x86/boot/header.S
@@ -217,18 +217,17 @@ section_table:
#
# The EFI application loader requires a relocation section
- # because EFI applications are relocatable and not having
- # this section seems to confuse it. But since we don't need
- # the loader to fixup any relocs for us just fill it with a
- # single dummy reloc.
+ # because EFI applications must be relocatable. But since
+ # we don't need the loader to fixup any relocs for us, we
+ # just create an empty (zero-length) .reloc section header.
#
.ascii ".reloc"
.byte 0
.byte 0
- .long reloc_end - reloc_start
- .long reloc_start
- .long reloc_end - reloc_start # SizeOfRawData
- .long reloc_start # PointerToRawData
+ .long 0
+ .long 0
+ .long 0 # SizeOfRawData
+ .long 0 # PointerToRawData
.long 0 # PointerToRelocations
.long 0 # PointerToLineNumbers
.word 0 # NumberOfRelocations
@@ -469,10 +468,3 @@ setup_corrupt:
.data
dummy: .long 0
-
- .section .reloc
-reloc_start:
- .long dummy - reloc_start
- .long 10
- .word 0
-reloc_end:
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-03-26 22:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1332520506-6472-2-git-send-email-jordan.l.justen@intel.com>
2012-03-26 22:19 ` [tip:x86/efi] x86, efi: Fix issue of overlapping . reloc section for EFI_STUB tip-bot for Jordan Justen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox