From patchwork Sat Jul 23 09:03:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 72647 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp196389qga; Sat, 23 Jul 2016 02:03:34 -0700 (PDT) X-Received: by 10.66.146.69 with SMTP id ta5mr13860740pab.157.1469264614570; Sat, 23 Jul 2016 02:03:34 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id d70si21029056pfg.162.2016.07.23.02.03.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Jul 2016 02:03:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; 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 198.145.21.10 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 27CEF1A1DF4; Sat, 23 Jul 2016 02:03:34 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) (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 513DC1A1DFF for ; Sat, 23 Jul 2016 02:03:32 -0700 (PDT) Received: by mail-wm0-x232.google.com with SMTP id o80so94294689wme.1 for ; Sat, 23 Jul 2016 02:03:32 -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=n2Tk+jGRscFRGVO/k0ey/8nx2HwzPhpgj6CUZ4+BmqU=; b=AHJ3iSGGeCBCLvjwR4NfeDDbSxF7OTcWv5ctlU/MQkyzWJuOeF72ukDvw4ejyKyCbL k6bNmEXPJQuWYcVF09BdkI970tfvSbbWasIl/hgBePGOBcFAXMl19Mq4pPImJJznWyPm EQqrPfEqBl0HMMj1er9s7xiNeIaUiQooI0M3k= 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=n2Tk+jGRscFRGVO/k0ey/8nx2HwzPhpgj6CUZ4+BmqU=; b=KmR6GuUcu86NGFj3Zw4L0qPF8WXhxxeHf7wKkhytsR3ZfxRNE8kT+YXNViKBBV24MP +RLIzG23ADqE7dIIrqEP4pria2QVCbNWFhdQiNsUQBqekZij3TPKQ30Gajn4vp6z7+Vc aC1Q3hGs0/oolHN5bREkv5I3P3JPQ8MeBJymz9RVJL5EzNYusSQhfa9g+HADV5F8I++y ZoaG6SccNnJsDF0ibLNmIQmSCOF4NWuJMCo2BDbiEKMRiPwKYlRrJWrApVHR4LuPNv0k AqnneWwMNspD0j19RfumJirZN3ID1Tbp8dyR9vrS8sFhQf6/QoePxVru/8U8x0ZlydTm LPIg== X-Gm-Message-State: AEkooutNf/+sdbstlPv8fUtUmI6UqUDjy2w79CzuBmhVIYlSmKpqGkt20cOv/tl1PT66tmuh X-Received: by 10.28.127.209 with SMTP id a200mr9060408wmd.99.1469264610956; Sat, 23 Jul 2016 02:03:30 -0700 (PDT) Received: from localhost.localdomain (154.red-83-36-182.dynamicip.rima-tde.net. [83.36.182.154]) by smtp.gmail.com with ESMTPSA id va3sm4901988wjb.18.2016.07.23.02.03.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 23 Jul 2016 02:03:30 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com, liming.gao@intel.com, steven.shi@intel.com, yonghong.zhu@intel.com, jordan.l.justen@intel.com Date: Sat, 23 Jul 2016 11:03:17 +0200 Message-Id: <1469264601-31356-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1469264601-31356-1-git-send-email-ard.biesheuvel@linaro.org> References: <1469264601-31356-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH v3 2/6] 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-Post: List-Help: List-Subscribe: , Cc: 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 --- 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 Acked-by: Laszlo Ersek 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)