Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2186505ybk; Mon, 11 May 2020 14:15:28 -0700 (PDT) X-Google-Smtp-Source: APiQypIEKsWXQ4ZTFCTvMpHhMY+xSSX1Rr2CEE47xXEaDQNbiW4f6PJy3Yi29pP2Pxr7wv8Vaksi X-Received: by 2002:aa7:d518:: with SMTP id y24mr14624030edq.222.1589231727986; Mon, 11 May 2020 14:15:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589231727; cv=none; d=google.com; s=arc-20160816; b=WqCZJmwSzhcgE1Ip65LJZG3tZADv4SOe8qPXlj1l7cDEVSrKmhp34nHXVQXxJvdxk5 PKhAde9zr0fHknilxtBcEPv2moFV02rMVAQupG8/sJ5Zno4RPyjM0tWOaiJEjYhQ74Fr V8UMQzXjii31cCvhUR4MPtJmwyO6oT5TR1mhEdiE5JrwrRccPpDNWYUawHUvZ8/zGD0G 7Lne5K7nETqAU+euYFJDmVj8ahCtDx36c54oRm3u2lLGha/X5lizNT/Ag+gSLREIDDOC 6LePsj/vGv6Tey8iQrQ3g9bTNYfT5kVQ0+dHRljcwrvMaw0klsTxzqWEZcTFTFysIIHQ ou8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=xCLg3bMxsyxzWNr/q1d31rFBp9fr1VZeMw9AuskbAJI=; b=I14eAh/TgH2TqdLjMbeoPcpaEPmpxDWXHpqkDW+Mt33IkhnhENao561rYbkeHjRbPO CvDsYNZDSMP1yDj9r7XqgeqQd/BuT+E2MF5u+85tF41KuUG2MyVTkhzJfQCrJ7Oo9WcU SuV2h43htAdBr6aBLSLfEhu1IUE5oSbPZ6b+t+mMJj4qgOhDNUqbPyxh/QK/QuZQ49mo 4ZrwIz9bS0cyK8UwkTwFK2mjTp7YGZ+rOBvfHzzRQVJ7ZvcDaEy/nSrVP/QAuLZ0IN4C JPKY5VKWQcAMJCwKMjMvYWUOalM44lyD14L0jYkDIGz9oXucPnFjFqcy/6XTjR4EeVcF lZ6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JZ+sXeEW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r18si6783145edp.599.2020.05.11.14.15.04; Mon, 11 May 2020 14:15:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JZ+sXeEW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726106AbgEKVNN (ORCPT + 99 others); Mon, 11 May 2020 17:13:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:52418 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725355AbgEKVNM (ORCPT ); Mon, 11 May 2020 17:13:12 -0400 Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1B9A720836; Mon, 11 May 2020 21:13:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589231592; bh=ZI2lj3is6y0WchsCEaGFt9C+Mv/t+oJAuodr5NVvGVs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=JZ+sXeEWBY15F0GSAKXGtEhq0BXaj71w4iU7jNJD1n37bsF6ra7cpm4y7GOPAj9cy l4CvkAe8ZOJEACWZKVMQdoZI1D1i2xXwZgw2jJCcI4xEcwapzrPXcnch4mpBPEGjhb c7GXSMqdJFWO/pZe7/a5aZe1gc6Ew7kFPtDpK/ls= Received: by mail-io1-f42.google.com with SMTP id k6so11546488iob.3; Mon, 11 May 2020 14:13:12 -0700 (PDT) X-Gm-Message-State: AGi0PuahFCQO3w4s9O1tj3hM31g+7eg1UqNEI5KJ228bY5dW7wxxXrSf 1VySNbDGdVwJ4eACgGUb8RzEz69JG1jchS0Wicc= X-Received: by 2002:a02:3341:: with SMTP id k1mr17753312jak.74.1589231591525; Mon, 11 May 2020 14:13:11 -0700 (PDT) MIME-Version: 1.0 References: <20200303221205.4048668-5-nivedita@alum.mit.edu> <20200511170149.1363260-1-mike@fireburn.co.uk> <20200511183645.GA596850@rani.riverdale.lan> In-Reply-To: <20200511183645.GA596850@rani.riverdale.lan> From: Ard Biesheuvel Date: Mon, 11 May 2020 23:13:00 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 4/5] efi/x86: Remove extra headroom for setup block To: Arvind Sankar Cc: Mike Lothian , linux-efi , Linux Kernel Mailing List , X86 ML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 11 May 2020 at 20:36, Arvind Sankar wrote: > > On Mon, May 11, 2020 at 06:01:49PM +0100, Mike Lothian wrote: > > Hi > > > > This patch has been causing issues for me since switching to GCC 10.1: > > > > CALL scripts/checksyscalls.sh > > CALL scripts/atomic/check-atomics.sh > > DESCEND objtool > > CHK include/generated/compile.h > > HOSTCC arch/x86/boot/tools/build > > /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: error: linker defined: multiple definition of '_end' > > /usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/ccEkW0jM.o: previous definition here > > collect2: error: ld returned 1 exit status > > make[1]: *** [scripts/Makefile.host:103: arch/x86/boot/tools/build] Error 1 > > make: *** [arch/x86/Makefile:303: bzImage] Error 2 > > > > Cheers > > > > Mike > > I'm not getting an error even with gcc 10 for some reason, but I can see > that it is busted. It's using the linker-defined _end symbol which is > just pass the end of the .bss. > > Does adding "static" to the declaration of _end fix your error? This is in a host tool, so it depends on the builtin linker script the toolchain decides to use. This is risky, though, as it may be using PROVIDE() for _end, which means that in cases where it doesn't break, other references to _end that may exist will be linked to the wrong symbol. I don't think 'build' should be expected to do anything interesting with its own representation in memory, but better fix it nonetheless. Arvind: mind sending a fix for this, please?