From patchwork Tue May 30 18:36:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 100727 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp352687qge; Tue, 30 May 2017 11:37:23 -0700 (PDT) X-Received: by 10.99.109.73 with SMTP id i70mr27503025pgc.62.1496169442917; Tue, 30 May 2017 11:37:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496169442; cv=none; d=google.com; s=arc-20160816; b=BMX4yQs5/ENnFW5shmybpaL/9H/Va9U10LGbNiV+ygEne4EeznWXDl8zcsWI99RzMI k950iHopT9ssaqgDgOB5d67Un5CjdOhFAlfd/P3RVYbrgweEjtwXYYHAK3qyn1znPHmM tQqBTkRHZUaAm1II3tSbREuPvrRRKjqInT1gDVB4r+icZJ2vLx75j6WXrNLSFCtRXUxO 0tHCSJ1qPLuy5rufBUy18qkAQsMVS5NRGuSRT+Ntr6Auq+1j+CrKI/rYYl89wZKLtlmv II2sFABszbna0vqzH1TgKw0oBNwIylzfFr8dXh4Bent0R79mcmwQey8v2nSV8oVUFbuV EYHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=h8PRqFVlBWEB4A3qvusA7fZkarv0TD//BuxaF7u139s=; b=PQq977R9WKoIJWITfystqQIHk6sheH4/Z4v87XF9jS03gtXN0zH2cLl5/smdjbTBqD 2IIubartidIMaANkMz7ISAx5QN9/HX0+y82PcqBsJ+fFTjxxnaKqWffPQKeb2eU2JnFR 9Vj/tiMB3+CxHK5h2l2Qx1C8je2D2fzHHQtAptgPCtzjqRqm+GKN7EcNCJj4xTwQWFoZ ORZC4evaQTszklceEXPg3worcnoCB4696jd8WyE2dX/Q/0l8UKYusP82O40sfhMo0ETo +HRAvxx01yEcjqLDy+H1ONz4XCvmyj43YtbhZR/2981xYunmuGH+wzF/IlTihs8ai1mW nUqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si44904691plf.190.2017.05.30.11.37.22; Tue, 30 May 2017 11:37:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751241AbdE3ShM (ORCPT + 2 others); Tue, 30 May 2017 14:37:12 -0400 Received: from mail-wr0-f182.google.com ([209.85.128.182]:33312 "EHLO mail-wr0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751162AbdE3ShK (ORCPT ); Tue, 30 May 2017 14:37:10 -0400 Received: by mail-wr0-f182.google.com with SMTP id v104so5599228wrb.0 for ; Tue, 30 May 2017 11:37:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Ufzn2wMF2X0ewfs984gzAqMIZGKBj40W7XprtCQlYDM=; b=A5XcwNlOJvTrV9m5Do1bX24OYFZUjgz42jLr4GZDVtc8AmGXcmeRX3bKfh6n9lSSjS 9nTSZug+XeLNwA8Q4s0L+QgZirIrisDHCHKX0XqV0yTDsLtimuk2GwqshdGp25eP5Oie 6Wor7zIr+LeaX6JyWeySCuaIVok2kTiP+j0ns= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Ufzn2wMF2X0ewfs984gzAqMIZGKBj40W7XprtCQlYDM=; b=FzJfeRgUgC2+39Qd/67h9gud3QpLC4bUun/69aKlFxC/vlBev2OgCw6LtXbdoySjUT 0MRrvCzKw4tIOqUcHrkq4lGWZTindHIlLahDwzZUHBcLBrjPBh5FZEqGesscXEt/dZtZ Lq9obySbC4hymZG7aXRt0gq8fA8QodQBjECL2NF/aVb99/5gL8F9Xz8NV0bGibuk0ylf gVQnJowGGheK1NzpGaZoE5YdKYw0/X6Rmg8MzB7TiokFOM1/P0y0KBjq7+BZ6r3nz47e vMYM8bLOY/ROZTib7ObRnDz1UB+qVkrUX0yXo4q7ZT2KxyrCDXhP2TnR44dla1ZTtSNE UA2A== X-Gm-Message-State: AODbwcCtD1Rb2wq/Ep/Ef8atbzTZraX15wVIcnODwfR0BmZtY9Wlcnff hWBmk/L7lMSW1UqNgbdvJg== X-Received: by 10.223.176.25 with SMTP id f25mr11830115wra.74.1496169429190; Tue, 30 May 2017 11:37:09 -0700 (PDT) Received: from localhost.localdomain ([154.144.49.177]) by smtp.gmail.com with ESMTPSA id b8sm15935997wrb.7.2017.05.30.11.37.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 May 2017 11:37:08 -0700 (PDT) From: Ard Biesheuvel To: linux-efi@vger.kernel.org, linux@armlinux.org.uk Cc: linux-arm-kernel@lists.infradead.org, matt@codeblueprint.co.uk, leif.lindholm@linaro.org, Ard Biesheuvel Subject: [PATCH 6/7] arm: compressed: put zImage header and EFI header in dedicated section Date: Tue, 30 May 2017 18:36:46 +0000 Message-Id: <20170530183647.28557-7-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170530183647.28557-1-ard.biesheuvel@linaro.org> References: <20170530183647.28557-1-ard.biesheuvel@linaro.org> Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.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 .start 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 --- arch/arm/boot/compressed/efi-header.S | 1 + arch/arm/boot/compressed/vmlinux.lds.S | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-efi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/boot/compressed/efi-header.S b/arch/arm/boot/compressed/efi-header.S index 3b1d95f43f2b..a0567ed366c6 100644 --- a/arch/arm/boot/compressed/efi-header.S +++ b/arch/arm/boot/compressed/efi-header.S @@ -126,5 +126,6 @@ section_table: .align 12 __efi_start: + .text #endif .endm diff --git a/arch/arm/boot/compressed/vmlinux.lds.S b/arch/arm/boot/compressed/vmlinux.lds.S index dfcc2baa0077..aa0ee9b5affe 100644 --- a/arch/arm/boot/compressed/vmlinux.lds.S +++ b/arch/arm/boot/compressed/vmlinux.lds.S @@ -39,9 +39,11 @@ SECTIONS . = TEXT_START; _text = .; - .text : { + .start : { _start = .; *(.start) + } + .text : { *(.text) *(.text.*) *(.fixup)