From patchwork Thu Jun 29 08:18:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 106619 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp818459qge; Thu, 29 Jun 2017 01:19:15 -0700 (PDT) X-Received: by 10.98.76.83 with SMTP id z80mr15205745pfa.87.1498724355606; Thu, 29 Jun 2017 01:19:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498724355; cv=none; d=google.com; s=arc-20160816; b=IwcvMAzPtNl5l8/aWqKHhpdjqlLR/W2E4TpghnJAKYQf5jc2kdmhwD3wZK+3ACCIMg DAy6MrFzxy27By3PaEKVhkUFOWCGUrlg0JWvQn01kW43F/dZnP/ZuD5FbBqhpAhfumnh CkRwFH106zhCbs5mWj8al3cdtOWRNCelGZz2I/TNmDB4ZjWqZDv76K4BYp2d5QNcIvSQ 9JRu9vQgLCXx0SdtHYTQ3Cx9bBf7fBCo4VsJdN2mn7s+QZmVR80TyWFyCCYfl78DtpDs rP4RHejKlVy59wi1KrVK+YIQxFg2WklRZg6gbSw581bpufVu4l6roWyhr1rFHT6N6gDY UoGQ== 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=39aWweblYX21LZPps1KRPlpAJ/qSlA0J6kNhQtqCGUs=; b=c48MMW/Q1xmjmCbvihCpZgXixT6nsqr8wjw1oUc4tqxJTKm3df2nbQ9coLG4glKV+4 UIe562x/t2g7f/PU8i1yRCBQaa4gMvKhOn7jvJcGaVJTmS1ZR2sPR1girc3y7PsTze4r JHORZgOwQUfBnfCwLaJ+dpP6jq0rxXrEHjdUM2I/VB7CM521Y3tOttb9xqM6dqoicL4V lcDN1g/zmsEM6ZS+MrF8Q6RsWwRu3PHTUFB/G3AxaL5JyhzMwAtKEfrhiIr3C2R7bs95 kjwuztStcX1hW9k/ThugAfrsG7UxorNB53Zp3QfyCzrSby6NaHftKiIt/vohegyY0UEA r3CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=IOtfrXI4; 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 h68si3195921pfc.73.2017.06.29.01.19.15; Thu, 29 Jun 2017 01:19:15 -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 header.b=IOtfrXI4; 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 S1752128AbdF2ITP (ORCPT + 2 others); Thu, 29 Jun 2017 04:19:15 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:37397 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751894AbdF2ITO (ORCPT ); Thu, 29 Jun 2017 04:19:14 -0400 Received: by mail-wm0-f50.google.com with SMTP id i127so5845237wma.0 for ; Thu, 29 Jun 2017 01:19:13 -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=MRqzlXx11IU9ovdc7P+x3NKMzzretObdsgiTBFPBceM=; b=IOtfrXI4Bjr9nvdFXoNP7qh390YA7byTz3GkC8BZODl3FIBza4pMcJWNJ0+Jd1wZfT 3bc77nDRCm+K12FPyszIo/GW5cr/6FD7CWEShvYbhSOsd43cA5k+eCLACAX3I85Fhrd2 1NDpWrRfkuCkEXUFINhZxxmJZaJukcSABxlls= 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=MRqzlXx11IU9ovdc7P+x3NKMzzretObdsgiTBFPBceM=; b=JlpwfI1PjaZwIBCHi8PThyCMP3d7OEfsdSDjU78/q4Yc6F+1p5DUZOKoqkqv7LZ7dn 65VDa7qJ/iwnPNy2I0Qs83zc5WcnYwDuxWotGwtA3j6YgEjHoQiF8TRKs5DEqj037Cki hy0ZNZs9S0LP1UVoXhZvQUgJ48SX6mEY/Q7Hc65HF3sQAxJ2nlbB3rgaan/jXtW4qbyo zuaT2VXyzYL1rQMHNl+bp8iCgIEMHp3wy587Eb4j7+NQbHCmEGweWMyhzjB3OM7QvuoK UGcO52WLfjg5Nqcp4apkBDFEe5K6q1Fx663aAfUOyjKi+RJoGlglLS/cO+avv7ljv7CU 4Hmw== X-Gm-Message-State: AKS2vOzFlVLRLaL4Xz/lJjBy6UvypY27F2W/JZtKQ0DZq/u68ZuaHBu1 6IOMGoWoDOcH1+5xS+HY7A== X-Received: by 10.28.134.11 with SMTP id i11mr9380475wmd.77.1498724352597; Thu, 29 Jun 2017 01:19:12 -0700 (PDT) Received: from localhost.localdomain ([196.90.227.203]) by smtp.gmail.com with ESMTPSA id p34sm5268190wrc.66.2017.06.29.01.19.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Jun 2017 01:19:11 -0700 (PDT) From: Ard Biesheuvel To: linux-efi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux@armlinux.org.uk Cc: matt@codeblueprint.co.uk, leif.lindholm@linaro.org, Ard Biesheuvel Subject: [PATCH v2 6/7] arm: compressed: put zImage header and EFI header in dedicated section Date: Thu, 29 Jun 2017 08:18:48 +0000 Message-Id: <20170629081849.15081-7-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170629081849.15081-1-ard.biesheuvel@linaro.org> References: <20170629081849.15081-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. Cc: Russell King 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 c94a88ae834d..a14516f7a27e 100644 --- a/arch/arm/boot/compressed/efi-header.S +++ b/arch/arm/boot/compressed/efi-header.S @@ -129,5 +129,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)