From: ard.biesheuvel@linaro.org (Ard Biesheuvel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/2] ARM: compressed: put zImage header and EFI header in dedicated section
Date: Mon, 5 Nov 2018 20:43:20 +0100 [thread overview]
Message-ID: <20181105194321.26657-2-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <20181105194321.26657-1-ard.biesheuvel@linaro.org>
To align the PE/COFF and the ELF headers of the decompressor binary, put
the zImage header and the EFI header in a separate .header section, and
emit it at the start of the Image. This change is necessary for UEFI
based debug tooling to be able to use the vmlinux ELF binary, since it
gets confused if the PE/COFF .text section and the ELF .text section live
at different offsets.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
arch/arm/boot/compressed/head.S | 4 +++-
arch/arm/boot/compressed/vmlinux.lds.S | 5 ++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index 6c7ccb428c07..261128840596 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -143,7 +143,7 @@
#endif
.endm
- .section ".start", #alloc, #execinstr
+ .section ".header", #alloc, #execinstr
/*
* sort out different calling conventions
*/
@@ -176,6 +176,8 @@ start:
.word _magic_table @ additional data table
__EFI_HEADER
+
+ .section ".start", #alloc, #execinstr
1:
ARM_BE8( setend be ) @ go BE8 if compiled for BE8
AR_CLASS( mrs r9, cpsr )
diff --git a/arch/arm/boot/compressed/vmlinux.lds.S b/arch/arm/boot/compressed/vmlinux.lds.S
index 2b963d8e76dd..94738ca5405a 100644
--- a/arch/arm/boot/compressed/vmlinux.lds.S
+++ b/arch/arm/boot/compressed/vmlinux.lds.S
@@ -34,8 +34,11 @@ SECTIONS
. = TEXT_START;
_text = .;
- .text : {
+ .header : {
_start = .;
+ *(.header)
+ }
+ .text : {
*(.start)
*(.text)
*(.text.*)
--
2.19.1
next prev parent reply other threads:[~2018-11-05 19:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-05 19:43 [PATCH v2 0/2] ARM: compressed: reorganize section layout and enable EFI debugging Ard Biesheuvel
2018-11-05 19:43 ` Ard Biesheuvel [this message]
2018-11-05 19:43 ` [PATCH v2 2/2] ARM: efi: add PE/COFF debug table to EFI header Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181105194321.26657-2-ard.biesheuvel@linaro.org \
--to=ard.biesheuvel@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).