Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2239836ybk; Mon, 11 May 2020 15:55:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCu1cm34f1Z5HumQQ0p8fXnxVWid+ZoZ+awE0xT3U7Ip3/VYwQBvjJObLlHE5sQAGwoskt X-Received: by 2002:aa7:da5a:: with SMTP id w26mr3505421eds.53.1589237719724; Mon, 11 May 2020 15:55:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589237719; cv=none; d=google.com; s=arc-20160816; b=m81x6gzgntgHUSCCYvDSwtXYtccZs+fJAkyPrUXs5PwM1ftFh7BsRjsOFRLhsFLdKV LZmE2odm9R6gYgMW4ABA0YQtVUH3B2uY96+xd6lqnG+CCMj4CVs5g4OU/zhjb5ER/Fpy 0UWmGBhHnhjM+5jGTjmRuxXTaD2zSLSd1/UmPBfJjs3SZimnsADYsvq4NOVeWtuhAgf/ rm/GHG5iBPTZNpLfkAO4Rx1LuGiojDsr9vPh5hrkfD5aJ/r30ycUmgCxoXE7g4p6I+5P TcpVyKeOeAbOJNbK7mPcIYExZa2vGRWC0n2xf0XHPsmPZ0OcyTF3ZI3YH4b/G6BsVB50 IMOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:date:from :dkim-signature; bh=YphSq6A1v4I+cV1naaXrYy9+htaDBx1Hhi/F0oFai1E=; b=0UeaQ5o7tpMnZi5oOFUL7k6ORsuZQOeoaTIjMaZhRdJ9V6i9LKqWJFfaUuJHQmxZGe FfkaBHIn/fw+y8H7hryOCjUW4vV9JXw++kGLmAgsdW5bPoyggJRt2vfzqaKanuEezG+2 CCEkzChdUgNCLg/aAIidNggJCMSL45eNro9PpZB+w21Xp8GdnURmvATF5mdADoNDH/GU x1AqA8aYpuFjuw6SU++dHJw+TeOGHK5FooOgrDt+XHeZusPGEwkWHYtAJylfPlGTkDQC E+f6knitC8DbkVq+INcD8/08Pk4qV+uX9DKYEBdZoAsDvRC67Vk4+oFUs7ULRIyAXTNJ OvKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=vc3uSObP; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rp4si6936647ejb.205.2020.05.11.15.54.56; Mon, 11 May 2020 15:55:19 -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=fail header.i=@gmail.com header.s=20161025 header.b=vc3uSObP; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727067AbgEKWx3 (ORCPT + 99 others); Mon, 11 May 2020 18:53:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725836AbgEKWx2 (ORCPT ); Mon, 11 May 2020 18:53:28 -0400 Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7DB9C061A0C; Mon, 11 May 2020 15:53:27 -0700 (PDT) Received: by mail-qt1-x844.google.com with SMTP id i68so9556287qtb.5; Mon, 11 May 2020 15:53:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=YphSq6A1v4I+cV1naaXrYy9+htaDBx1Hhi/F0oFai1E=; b=vc3uSObPLePA6JT0lSL3grgVDF8dkVZqHkTljTrBVZapWRF92Thk9z0hcIIUhu2Mwg wkXlTsyNDosMUUWpL3ho7Ar2sEWUEIbA2DZdWnswQhvGfnBUWdDPmlZ/8LmtJnOzopJs x2py/I3vEg2KGuD0i673/J2rFs/bOTC9pRclJ1E4tHtzOLx9uwohYfl+m6bs4ozrUFkw eaSyVIyatC2Cnz1wgnECAuu6hA8UkOLvE5m3d0grTgjA0Wyf8k0w+f5VS4hXrqbYXI1e DxXrNHsgEc7e5fPHAp2Qfq/s3HglwjFBWC3VNiLwfG7E5UU8WV5bvZmPIEgaPn8Zi5p+ HMtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:date:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=YphSq6A1v4I+cV1naaXrYy9+htaDBx1Hhi/F0oFai1E=; b=p+bDCKEhpWkdTl7r6U4tt2+Ywr1S4KmsP9zYHPhYrcel8XIMIRvgwiSBFv8kjxQnEO ntLWbNQgmaoJg1kiBt6KEZWYfQlZT6+lcmo9uS1K8YDtHA0usvSvtDNa3wesECre4F31 9IpJKXBax0uPFX3kMJkEWC/8goLozaoyyH3HzyKyMb3uXo2MqmdL6Fw9vxOv1jZO2dZf WSRwk2SB26aWowzIwdw6LWHqi/6b/Pp1rglaxqC15Ya/PT1c1YRie3upaoLVjMaAfPF/ xJdypjSeY7BkEqUOnzkFKm8PVfqBoUAjBn1rXvq4+Tyy/hzX7CGvdq6NyUUk43GVMS78 ZYUw== X-Gm-Message-State: AGi0Pua/jXTq8rztatBwqT48IZeqQM/OGCHKd1U19fbCqs/7uV16VOb+ M37r00RGXPvT8UNLf68GW/AhnjH971g= X-Received: by 2002:ac8:839:: with SMTP id u54mr12267672qth.382.1589237606886; Mon, 11 May 2020 15:53:26 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id b33sm2382131qtk.97.2020.05.11.15.53.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 May 2020 15:53:26 -0700 (PDT) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Mon, 11 May 2020 18:53:24 -0400 To: Ard Biesheuvel Cc: Arvind Sankar , Mike Lothian , linux-efi , Linux Kernel Mailing List , X86 ML Subject: Re: [PATCH v2 4/5] efi/x86: Remove extra headroom for setup block Message-ID: <20200511225324.GA1307788@rani.riverdale.lan> References: <20200303221205.4048668-5-nivedita@alum.mit.edu> <20200511170149.1363260-1-mike@fireburn.co.uk> <20200511183645.GA596850@rani.riverdale.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 11, 2020 at 11:13:00PM +0200, Ard Biesheuvel wrote: > 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. Right, _end _is_ getting redefined in my system linker script too: I can see with objdump that the final _end symbol in my version of build is actually pointing beyond the .bss. But my toolchain doesn't report an error for some reason. > > Arvind: mind sending a fix for this, please? Yeah, I have one ready -- was just waiting to hear back if "static" did fix it, but I can send it out now.