From patchwork Mon Aug 1 08:01:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 73089 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp2567680qga; Mon, 1 Aug 2016 01:01:53 -0700 (PDT) X-Received: by 10.98.71.140 with SMTP id p12mr93495570pfi.93.1470038513444; Mon, 01 Aug 2016 01:01:53 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id c69si33898690pfj.224.2016.08.01.01.01.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Aug 2016 01:01:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; 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 edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id F2DC51A1E29; Mon, 1 Aug 2016 01:01:52 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5C9131A1E11 for ; Mon, 1 Aug 2016 01:01:51 -0700 (PDT) Received: by mail-wm0-x22c.google.com with SMTP id o80so231390692wme.1 for ; Mon, 01 Aug 2016 01:01:51 -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=xzQSHNmcNNt7BhMmfas69rSesLn2D8aG9d0t4hjsnlI=; b=ZwVOuKxZr6RcPj5q4xe3VtiWfJI3oCE9IDmXQOHnS0PD19UNDBub5ZWhzedenPO+/b YqVhLiU7fR7FFjl5scKG5q182Csx3BM4c9TYP8CHRGwz1fPpcl/UHpPHddDW5pW5DNFK VDX+Y76XxIzbTHpTjV0viZdRxSwBl5hn+Vo0g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xzQSHNmcNNt7BhMmfas69rSesLn2D8aG9d0t4hjsnlI=; b=F2b+sLD0AqSW2kv3tt891rQ1AmgFOs3Vlxn/aIz7HMySIePtk/CM2u+S7JKDXLYFpT N2A2S24uicd5en/IWAmNnsovtu0S9jYhaf6mL9wU5yJFHNS+KFYbiAyBy5AyvVMVK9cp CHAr3oWz0rn36WHI/83h3xGmKq8PNt5MDLhuAQ+xV1gnsOzLoRSOzeoqfp1fO9+JgVbH f2xBvlxPV7GMm4Z5ahQ1bJs27qs6sh+0dzksVDq7X6U8u1Gv62M2mmQ4C3ZTitRSDAji 0y0egZ0ltwtbMFj/9le82Zfv/OjXvkAbYbRXZNyL4N9jOaXWerx+Kpj1H/mBrZa3o+xC G7zQ== X-Gm-Message-State: AEkoouv73fAq0io0SobzKJJYGlRgyY7cbuffDUxbR72B+W09UvCaHRLbdWc1dv+49LbP0Fg7 X-Received: by 10.28.216.75 with SMTP id p72mr13006628wmg.67.1470038509953; Mon, 01 Aug 2016 01:01:49 -0700 (PDT) Received: from localhost.localdomain (3.red-81-34-118.dynamicip.rima-tde.net. [81.34.118.3]) by smtp.gmail.com with ESMTPSA id m62sm15671943wmm.24.2016.08.01.01.01.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Aug 2016 01:01:49 -0700 (PDT) From: Ard Biesheuvel To: steven.shi@intel.com, yonghong.zhu@intel.com, liming.gao@intel.com, jordan.l.justen@intel.com, edk2-devel@lists.01.org Date: Mon, 1 Aug 2016 10:01:31 +0200 Message-Id: <1470038497-2536-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1470038497-2536-1-git-send-email-ard.biesheuvel@linaro.org> References: <1470038497-2536-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v5 2/8] ArmVirtPkg/ArmVirtPrePiUniCoreRelocatable: ignore .hash and .note sections X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lersek@redhat.com, leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Newer versions of ld automatically emit .gnu.hash and .note.gnu.build-id sections, which are not listed in the linker script, and will end up breaking the build with an allocation conflict, e.g., /usr/bin/aarch64-linux-gnu-ld: section .note.gnu.build-id loaded at [0000000000000000,0000000000000023] overlaps section .text loaded at [0000000000000000,0000000000017dbf] Since we don't require or care about these sections, update the linker script so that they are discarded. Note that this involves emitting the .note.gnu.build-id section into a non-allocatable segment to prevent the linker from noticing that it is being discarded (and subsequently complaining about it) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel Acked-by: Laszlo Ersek Acked-by: Jordan Justen --- ArmVirtPkg/PrePi/Scripts/PrePi-PIE.lds | 3 +++ 1 file changed, 3 insertions(+) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/ArmVirtPkg/PrePi/Scripts/PrePi-PIE.lds b/ArmVirtPkg/PrePi/Scripts/PrePi-PIE.lds index 832ad1474468..44df7840adfd 100644 --- a/ArmVirtPkg/PrePi/Scripts/PrePi-PIE.lds +++ b/ArmVirtPkg/PrePi/Scripts/PrePi-PIE.lds @@ -30,8 +30,11 @@ SECTIONS PROVIDE(__reloc_end = .); } + .note (INFO) : { *(.note.gnu.build-id) } + /DISCARD/ : { *(.note.GNU-stack) + *(.gnu.hash) *(.gnu_debuglink) *(.interp) *(.dynamic)