Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp5126168ybh; Wed, 7 Aug 2019 00:56:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqwRfkvPoVr0tRk8qc8yYZDVCq/xZt4R/JaCyJnorajDop1qFsmkLFsnz3lB1+CgR9gRzCwq X-Received: by 2002:a17:902:b713:: with SMTP id d19mr7090507pls.267.1565164599411; Wed, 07 Aug 2019 00:56:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565164599; cv=none; d=google.com; s=arc-20160816; b=LYq26nunOvW9tOZiFyVxGOs8nOfcKV5w8D9lWtAelh87uL0WKzgkhFKJ+7q49Lq7YO EbBuL8GMSb95U0mEE9NqkdK9zyOdiRGB3jZ4gM4KSKMZjTF3ll/tanVbQLJLomw11jJG AiVPBSbwkVRjeIBoZT1VucKIfwcahEErSU6upSgxZx4m3d4A87RHJxKTKXSGzWxV+my2 0g281GptFX//V5i53fLgNC4r0GnyEvZwv+5XLQc99rx5K5hqUKWbcLEyj+pX3sbceeHB Tv9yGkFT1Op3wnKsC/e9Ofl3F8fLJLGRhUckSjqOUOlwdQU8UfQl2CaubxVDfRVxvWv1 FuMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date; bh=DMT20fC/ZNYYtmhOyruukgvZ2/EoL+VZuvfz6YrzrJc=; b=mp3WPRpw05YcIosnnGpyOYnzhPOmMUX0oIcc+DgzwxXCfe6JufZ9y2mZe+qpzoX2PJ pdf2xnOJUjbWoQi+FitBeXqj0smTtbNptHyfH4Z4mwwtHPBH3AaQGdkOgitRdLNmeC6r HWyys5G2iG5ltkicYN/Vxeln6MuPsGtiS7KY21/UdzqGw2knIgpPQ4jcKZHgwtCWbg/+ lVhwEJUQhnPlYvOw/8XEt0U2XYzP+utrorWL6caCXzGuzG/v95pj0ZWjLshoI4X3WERP sTBlGC2QjIrO0yWwYnVXhBr4IUxijuOrnMJNRu19ZyfOo/0mpm08Wo5ro7M1uvjG69VL MbrQ== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o19si34851628pgv.497.2019.08.07.00.56.23; Wed, 07 Aug 2019 00:56:39 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387485AbfHGHy7 (ORCPT + 99 others); Wed, 7 Aug 2019 03:54:59 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:11788 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727413AbfHGHy7 (ORCPT ); Wed, 7 Aug 2019 03:54:59 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x777qWbB114032 for ; Wed, 7 Aug 2019 03:54:58 -0400 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 2u7sxr9ntr-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 07 Aug 2019 03:54:57 -0400 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 7 Aug 2019 08:54:56 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 7 Aug 2019 08:54:53 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x777sqtm35848414 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 7 Aug 2019 07:54:52 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C866F4C050; Wed, 7 Aug 2019 07:54:52 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 965B74C046; Wed, 7 Aug 2019 07:54:52 +0000 (GMT) Received: from localhost (unknown [9.152.212.168]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 7 Aug 2019 07:54:52 +0000 (GMT) Date: Wed, 7 Aug 2019 09:54:51 +0200 From: Vasily Gorbik To: Masahiro Yamada Cc: Arnd Bergmann , Linux Kbuild mailing list , Linux Kernel Mailing List Subject: Re: [PATCH 2/2] s390/build: use size command to perform empty .bss check References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-TM-AS-GCONF: 00 x-cbid: 19080707-0008-0000-0000-000003062B61 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19080707-0009-0000-0000-00004A242CB1 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-08-07_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=993 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908070084 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 07, 2019 at 11:33:40AM +0900, Masahiro Yamada wrote: > 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. Indeed, thank you!