Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp4854072ybh; Tue, 6 Aug 2019 19:36:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqzff4Q/YDeFZ39+CXIb+sczJhCpNPGSEnGiQJy16Ztcn2Sj9xPb29uYq2SXYAvcPXtcZVX4 X-Received: by 2002:a17:90a:7787:: with SMTP id v7mr6219043pjk.143.1565145396200; Tue, 06 Aug 2019 19:36:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565145396; cv=none; d=google.com; s=arc-20160816; b=P/tRYzMAbmaXu3GQKFi6XZb1pGnC9wtzi2eNDkETTk10E9aM5noZpvcrI/rMIniEkO smBGJhJyArrLD32dugcwfC8Ac2SrbvQJpLiml8UlnZ1iTVtyOkq/r/QGQXPK8rq+gM/8 DzKLT2BNGklrqf00BnDutto0RVQl7Ot4skYIqW1w8XbWitSBhF1wGgs3pWzkbRBMERfU P7Ou3ESs6vX/HuxIqz+un1YMTJMHlijuyEXXeh5OzPfcNuo1MnC6KnCRi0cLZouC3eME LcB0CJaPXEr2aRJxumES72UgK0fwQSeKb/2XwIBCl9NuCWwP+FVTwKRKxhL0iRe628GW tdKQ== 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:dkim-filter; bh=+Na/oaFlPFLzhHHyEv2bDd3O81VBBu2zQfuRfwJvQXw=; b=Fyxr9jtxe6uN1A56IlyZpiMc5bN3fwkl+8/pGjMY9Ld2HSjGKemDTx+c70theWLs79 SJ48bIyF2pShabdiHrTV8tUzJqxnjIwcCHOnLuFqZh9hBEhMUg+TOz2iJdpdw7rH8+qR DDyGPWBZNwl1Ixs4DWZwZUD6oO2g4a3Nft1nunlvAe+VIIWCcFoGnYwBOu0jWRyXTiKS jVwOhSyE13khUQbI875Ata9iU0a7zNWedRiU2UUM2nKFYs22bGcSfE3bcJyAUt/FiPRl oxA8xAn0ZA+nqQMa4mUzvCNujXSq1TRGMGvEtfHHAv6D+YEi3AurSqG3zDaN2E6nxBB5 jY2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="XR/rK36v"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x24si16195220pjt.88.2019.08.06.19.36.20; Tue, 06 Aug 2019 19:36:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="XR/rK36v"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727881AbfHGCea (ORCPT + 99 others); Tue, 6 Aug 2019 22:34:30 -0400 Received: from conssluserg-04.nifty.com ([210.131.2.83]:27579 "EHLO conssluserg-04.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726431AbfHGCe3 (ORCPT ); Tue, 6 Aug 2019 22:34:29 -0400 Received: from mail-vs1-f53.google.com (mail-vs1-f53.google.com [209.85.217.53]) (authenticated) by conssluserg-04.nifty.com with ESMTP id x772YGBx024672; Wed, 7 Aug 2019 11:34:17 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com x772YGBx024672 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1565145257; bh=+Na/oaFlPFLzhHHyEv2bDd3O81VBBu2zQfuRfwJvQXw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=XR/rK36vh0u87Xwt/y65OytK2uSGxSVdUOpRXGuCh2V2j+xpQW7awgRGdu4gSypo1 60/d4Y6AxDIZ8irZTynu/TKj018yb408S7rFHdsVYCQodsoEMmk7HxcJ3JZOwUt2r8 dAiJHoaxI/n35llOtDwrOSh1TneMZMoGjMkL0dnZQvG+RhLVsfVNXUi8QEOEEu7d6s e8kMLvv1ul6FYSoEQu9S7yfPpyXFXRsYM52IaGXbnPGNeoFI9Z0IQzUbyaf5fQZmZc E5HJ8fIBPfcotetORay00H/2iRjNNUQDJxkVwFKYt22bU12RFXDKeY/DxBf8cpWyHL yvwML97GZdeJA== X-Nifty-SrcIP: [209.85.217.53] Received: by mail-vs1-f53.google.com with SMTP id 2so59635461vso.8; Tue, 06 Aug 2019 19:34:17 -0700 (PDT) X-Gm-Message-State: APjAAAU0NMJ2I/hbIZ2ir17Bzj9ADmQIiU+YYT2omy1c/EehMyndnVag VwTehROxDwKx70FzOBbFIOLW7CW4ktvr8a6IMcQ= X-Received: by 2002:a67:8e0a:: with SMTP id q10mr4441385vsd.215.1565145256312; Tue, 06 Aug 2019 19:34:16 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Masahiro Yamada Date: Wed, 7 Aug 2019 11:33:40 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/2] s390/build: use size command to perform empty .bss check To: Vasily Gorbik Cc: Arnd Bergmann , Linux Kbuild mailing list , Linux Kernel Mailing List 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 Tue, Aug 6, 2019 at 7:56 PM Vasily Gorbik wrote: > > Currently empty .bss checks performed do not pay attention to "common > objects" in object files which end up in .bss section eventually. > > The "size" tool is a part of binutils and since version 2.18 provides > "--common" command line option, which allows to account "common objects" > sizes in .bss section size. Utilize "size --common" to perform accurate > check that .bss section is unused. Besides that the size tool handles > object files without .bss section gracefully and doesn't require > additional objdump run. > > The linux kernel requires binutils 2.20 since 4.13. > > Kbuild exports OBJSIZE to reference the right size tool. > > Signed-off-by: Vasily Gorbik > --- > arch/s390/scripts/Makefile.chkbss | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/arch/s390/scripts/Makefile.chkbss b/arch/s390/scripts/Makefile.chkbss > index 884a9caff5fb..ba1d7a8a242f 100644 > --- a/arch/s390/scripts/Makefile.chkbss > +++ b/arch/s390/scripts/Makefile.chkbss > @@ -11,8 +11,7 @@ chkbss: $(addprefix $(obj)/, $(chkbss-files)) > > quiet_cmd_chkbss = CHKBSS $< > cmd_chkbss = \ > - if $(OBJDUMP) -h $< | grep -q "\.bss" && \ > - ! $(OBJDUMP) -j .bss -w -h $< | awk 'END { if ($$3) exit 1 }'; then \ > + if ! $(OBJSIZE) --common $< | awk 'END { if ($$3) exit 1 }'; then \ While you are touching this line, you may also want to replace 'awk' with $(AWK), which is defined in the top-level Makefile. > echo "error: $< .bss section is not empty" >&2; exit 1; \ > fi; \ > touch $@; > -- > 2.21.0 > -- Best Regards Masahiro Yamada