From patchwork Wed Jan 27 18:01:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 60637 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp2738819lbb; Wed, 27 Jan 2016 10:03:13 -0800 (PST) X-Received: by 10.67.6.195 with SMTP id cw3mr44575831pad.88.1453917793758; Wed, 27 Jan 2016 10:03:13 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id n28si10850225pfj.101.2016.01.27.10.03.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jan 2016 10:03:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aOUPr-0003wl-3u; Wed, 27 Jan 2016 18:02:03 +0000 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aOUPo-0003uX-6M for linux-arm-kernel@lists.infradead.org; Wed, 27 Jan 2016 18:02:00 +0000 Received: by mail-wm0-x233.google.com with SMTP id r129so155142155wmr.0 for ; Wed, 27 Jan 2016 10:01:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=xax8WP5Gbg9z5/+Fq+ewnk2TM5FthbZQLePxk7UK36w=; b=bGrQ0arjW+LdNzigO9uNF2ElrgEo7UcpovORgegWcmpQmJ9VmM97Tbi3VkNcWEBb02 wVw3uEnZNl21Mi/9r2hdS7/1ZxtBeXNciZFgbIURun4wTFx8YfkC88Pakg51yRjrV0w0 gvDWffokDs/5Lyk70w+6UdZvKoEo8n1WASB7c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=xax8WP5Gbg9z5/+Fq+ewnk2TM5FthbZQLePxk7UK36w=; b=HIW5QxNYsrj+bzBIBQowcs1pNXFMJGSAIbw+2T5qFInToLJq/KqBCHCwmq7ReUyr6s g3lyLnvQrkcz9C//rQEHE2sGpSUYuIB8jB9MWoMgMhKA43OiK0AOyj1ay3QZ6yyfPq47 KXPOowvo69kR/YvDrl9SKb19NGGPgLc5rga4Lpmvuy+/Dt+79El+P+8zgaW/iwUnjPSx /8hSOGLbBGPkNSbd/mXl4LI4oL9d3Gl19O7rtYj0E5u7FDwt4RPqb8x4yYcTMg8yuYx0 hozZ9OffZgaYCbYglW3yTdatBR/nwiEek1CL/QD8Ld0OOkUlT16LdZLUXTrqHmxwIgVW 1odQ== X-Gm-Message-State: AG10YOShKS1V3yoxUFH66uMlPHxcZkyRuiL4nbhu6zPofhqksjjES/qHtcE98We5Yatpn762 X-Received: by 10.28.23.73 with SMTP id 70mr30242842wmx.37.1453917697033; Wed, 27 Jan 2016 10:01:37 -0800 (PST) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id i63sm8711773wmf.24.2016.01.27.10.01.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 Jan 2016 10:01:36 -0800 (PST) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, will.deacon@arm.com, catalin.marinas@arm.com Subject: [PATCH] arm64: use local label prefixes for __reg_num symbols Date: Wed, 27 Jan 2016 19:01:27 +0100 Message-Id: <1453917687-2494-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160127_100200_386643_FCA5E09B X-CRM114-Status: GOOD ( 11.00 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:233 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, Ard Biesheuvel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org The __reg_num_xNN symbols that are used to implement the msr_s and mrs_s macros are recorded in the ELF metadata of each object file. This is not a problem in terms of code size, but it does clobber the output of tools like readelf, i.e., $ readelf -a vmlinux |grep __reg_num_x | wc -l 50976 So let's use symbols with the .L prefix, these are strictly local, and don't end up in the object files. $ readelf -a vmlinux |grep __reg_num_x | wc -l 0 Signed-off-by: Ard Biesheuvel --- arch/arm64/include/asm/sysreg.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) -- 2.5.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel Acked-by: Will Deacon diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index 4aeebec3d882..7d771ac01289 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -196,16 +196,16 @@ #ifdef __ASSEMBLY__ .irp num,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30 - .equ __reg_num_x\num, \num + .equ .L__reg_num_x\num, \num .endr - .equ __reg_num_xzr, 31 + .equ .L__reg_num_xzr, 31 .macro mrs_s, rt, sreg - .inst 0xd5200000|(\sreg)|(__reg_num_\rt) + .inst 0xd5200000|(\sreg)|(.L__reg_num_\rt) .endm .macro msr_s, sreg, rt - .inst 0xd5000000|(\sreg)|(__reg_num_\rt) + .inst 0xd5000000|(\sreg)|(.L__reg_num_\rt) .endm #else @@ -214,16 +214,16 @@ asm( " .irp num,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30\n" -" .equ __reg_num_x\\num, \\num\n" +" .equ .L__reg_num_x\\num, \\num\n" " .endr\n" -" .equ __reg_num_xzr, 31\n" +" .equ .L__reg_num_xzr, 31\n" "\n" " .macro mrs_s, rt, sreg\n" -" .inst 0xd5200000|(\\sreg)|(__reg_num_\\rt)\n" +" .inst 0xd5200000|(\\sreg)|(.L__reg_num_\\rt)\n" " .endm\n" "\n" " .macro msr_s, sreg, rt\n" -" .inst 0xd5000000|(\\sreg)|(__reg_num_\\rt)\n" +" .inst 0xd5000000|(\\sreg)|(.L__reg_num_\\rt)\n" " .endm\n" );