Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp3942756ybh; Tue, 6 Aug 2019 03:58:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyMPIPfQkqWMTdABTIn/JDFXb1g13sTyQ+j+p1xhJLLDL7pPnxlunTPr5w1wwcNVaeZD2tk X-Received: by 2002:a17:902:b789:: with SMTP id e9mr2553943pls.294.1565089089681; Tue, 06 Aug 2019 03:58:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565089089; cv=none; d=google.com; s=arc-20160816; b=FhPDN3cXCfukPPDBCS5ngyU1ILBox4yYJozmfVG2n8hAT2XZuMZmwWMLkX7DeFkpuU HLCLEkLv9/wGuQo7BCrEm7f8f5aTDs9iiIPSNsQbYd/srFWsr7p88wYor/CFHiGZm2of kQpCX6/J5Q7basG9mo8sAGGEjMkIFc647uQjUozHW48vbdq+zL+jwxr+ErgxBu3aqJMn JLDbQXwVEfm8qArslgVb0Z6rVoM73aysUevIwCoUyeMIbA024Q8sNvO6kaHN4roOPWg5 fTIfiuPdhHYJHSzDHS7F33h1rcVwXc1v6scP3vx9Gw3k/xeLVZvmTjNUH478XylKI5Oj Eg8g== 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=Gi1OWukST0T0Bu8FwY4ylfux2HVRlnz8uEB+BC+pJ9Q=; b=HK+2AIAaTEeQciKBhI4ELegh1kZwxyA+d3b622Jq2X+xzlfgoYpF/qMV0HtvhD3z+8 jyFHMz3Lxp+milpXSt07S9FWUGcNb4hXsEYgYnw5/eP4eHu7ToWB3hz9VVf7p6NmaBYo Cb8X3r7rir7Q+OR9KlBP+yfJx9K4aGGovOspsx1GqBi5tFfviMm7ml0Y8D8DN77iYqdq UUzPyK1UAk0GoCYbSQXDck4P2YQ7Wk9XITf9nLnajNHQw6jJ+EbfVTX7lJdm4ts9Dodl 9GiBc72hPLSw2F7K++vbOcQpiFLNVJ5gKYTt1FH/mlS9cG8LD3mBqECcXsVIaIuy/nR1 0TXw== 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 r41si15553384pjb.11.2019.08.06.03.57.54; Tue, 06 Aug 2019 03:58:09 -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 S1732694AbfHFK5Q (ORCPT + 99 others); Tue, 6 Aug 2019 06:57:16 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:2256 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730902AbfHFK5Q (ORCPT ); Tue, 6 Aug 2019 06:57:16 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x76AvDWH031831 for ; Tue, 6 Aug 2019 06:57:14 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 2u75nex83s-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 06 Aug 2019 06:57:14 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 6 Aug 2019 11:56:53 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 6 Aug 2019 11:56:50 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x76AunAF56754246 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 6 Aug 2019 10:56:49 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9B915A4051; Tue, 6 Aug 2019 10:56:49 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 73193A404D; Tue, 6 Aug 2019 10:56:49 +0000 (GMT) Received: from localhost (unknown [9.152.212.148]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 6 Aug 2019 10:56:49 +0000 (GMT) Date: Tue, 6 Aug 2019 12:56:48 +0200 From: Vasily Gorbik To: Masahiro Yamada Cc: Arnd Bergmann , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [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-Patchwork-Bot: notify X-TM-AS-GCONF: 00 x-cbid: 19080610-0012-0000-0000-0000033A8946 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19080610-0013-0000-0000-0000217442AF Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-08-06_06:,, 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=908 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1908060113 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 \ echo "error: $< .bss section is not empty" >&2; exit 1; \ fi; \ touch $@; -- 2.21.0