From patchwork Tue Feb 20 21:59:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128980 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp5105664ljc; Tue, 20 Feb 2018 14:01:43 -0800 (PST) X-Google-Smtp-Source: AH8x224FtflKDLED2p/8m+w2TsRB6mZCQs2fiyh5toouNdfeV+gykLOX/fb63GnRX1TnCfcfb2fv X-Received: by 10.99.120.201 with SMTP id t192mr839094pgc.39.1519164103562; Tue, 20 Feb 2018 14:01:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519164103; cv=none; d=google.com; s=arc-20160816; b=qmR82edHldpQSoGgs84OVABUG7/X0Pm9uMie3UDBaMYuASrJ3jNObup4ctEK2sZ+dL Qef+PRt1NJGgLVtjOLxgNDrczs0acNEN9tlC0UDyFZc2H6nld1g13AeHJzRDq41TTIwD z089pxuO1z7y7DSn3ySFttyMFoTe9IvcurosWOeswJ0CN+eo0oX8F8VyR+06QhOZ8/aY 2ATpHx2FkLEKf9nGiWJrTyNGX7NxuPPNAtqx7jX5mcgJoG1eZHwvINP7JmUoeBJKecq9 Gx2i3+hBGZ1xC9lo2iiNR85CngbuOPD1MvuEtG6JFkSwI8/Pp8p7TqMi0O/ODFT2iAFh nx8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=6cvg+gSAbZqIStNrD+h2cPClCRjx+gbR1ms2/njHTMs=; b=ylo9nPAwkhffDb0AgivVJvuAeiaOg0Dakbp3jHG9R8AqbuQ9ULrr93HIcm/UxPwKKk Re5vJcEyrjWynX8o7eq4NBwmhdFyqVhGCubBBD6ojSqPlelWPiywCY0mRouM3xodPyks VAA9fTzUQ1ZOhaoNBoQTCvDC/5s1r6mSv4xS/3sAm4o1RXslQp9ffsJu7k9MQGOlKMjf DbFbzh5X0FSzWWb74uAePkOzYpuCdISkgO0k0m8x606h6+3cku92jRXctHC5l+O0ScMe pPxL/UY0UYOFjfqE2ZUTw/KzlXSpYRYcMfVZhm3beQ7VU0upQKEZf+EB6HUNj2HyxSNH TyOg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e125si5419363pgc.506.2018.02.20.14.01.43; Tue, 20 Feb 2018 14:01:43 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751503AbeBTWB1 (ORCPT + 28 others); Tue, 20 Feb 2018 17:01:27 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:34563 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751233AbeBTWAU (ORCPT ); Tue, 20 Feb 2018 17:00:20 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0McWDw-1f5vKQ0R3Q-00HjYD; Tue, 20 Feb 2018 22:59:58 +0100 From: Arnd Bergmann To: Nicolas Pitre Cc: Andi Kleen , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 1/7] ARM: disallow combining XIP and LTO Date: Tue, 20 Feb 2018 22:59:48 +0100 Message-Id: <20180220215954.4092811-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220215954.4092811-1-arnd@arndb.de> References: <20180220215954.4092811-1-arnd@arndb.de> X-Provags-ID: V03:K0:68CP8D5zJQFwnlFrJ/irQ54USuaEt6O5wK4lDMNIAyakOc7alQ2 eQ/4aC76leERsEA1T/DOpfDW3K4PVo1T2mnzXFqPQcRtehbPZ7cWo+lyDWD5TrH/jpHm+Al O6rfVaM83JPtqeAt8Y1P20vq4NwFY3JVBIAMLaLrP9sKNDGE4tUB89fgY/kzu4Uojy46pnm NXE7vMpvOdbTDISlPrJpg== X-UI-Out-Filterresults: notjunk:1; V01:K0:rR8Kc8pDCKk=:ndfU5F6i9ZigA1mfZqMVBF Q38QVPhjLkB5CoVuApUGOAk8hNVq0HX3eZQ4eXGL85WY2OT4Q6gw8hBfSzdUDhYy/sCtb7qMn A0K4SkY5VbnEmYfmKklZUeQraieZ4JSysqCxIVSf3WyPAtWRTMvbTQBY47fIxU1iQ4TfUbHyH 3juU7cLJ6mufH6oO0RYg1CwNGeE5l0tsLR2vOwBEHWlnEwqTWGC06u7OqlQrWXg9Iqp7mFC4o CZRqfG2SIYwgzrk108RSK0vdTvID7/eVM0Vaqcw47y6gTVN9WyXraD6ljkT0pHh5RfYxSsHDV ZsTHCXDKOFRhX4nMatMPgVVwQPfhQ9R7hh1B+kXDsuRf5tRvnmq6KGzfhZHhsD4aRyKS1xg33 p6wz2dKp6K/mL1ettGP13zC7VGN5fO/yD/qKPswkW6pXxjGGKCG7WeBxBNZk7Y9XSxlyo/6AU 0ej7nm9URsuhYBW0zXfV0J1FSSmQ/8e4VNSOIAY4jcpJbZT0nVXaCOsp2UJegvcndGsUXY3CK N5j1PLqE1XOE7njy+UDgyOgPtPHb5oJMZMNMhVPKY3myyqIrBx9w4+HTcbngUeOET7UbcbPbC d436lrCgQ5N9Q25jMRcihWbaZZGVG0rmgF2cu0ykrTrvaVZbUGt+KQo1Tuj6QP62AfuUwtDtg oRxmud2e67XgFnW+RJ1TsUyJ3NBfqroVPyYzV0AoXSoUVSLB6nvLjg9w1PowK9MWxrR7HpJYn CXjbSqmozplKYfGX3crpAsbom6YEhMt+p8yX/w== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This fails during deflate_xip_data.sh /home/arnd/cross-gcc/bin/arm-linux-gnueabi-objcopy -O binary -R .comment -S vmlinux arch/arm/boot/xipImage && /bin/bash -c '/git/arm-soc/arch/arm/boot/deflate_xip_data.sh vmlinux arch/arm/boot/xipImage || { rm -f arch/arm/boot/xipImage; false; }' make -f /git/arm-soc/scripts/Makefile.modpost + sym_val __data_loc + sed -n / __data_loc$/{s/ .*$//p;q} + /home/arnd/cross-gcc/bin/arm-linux-gnueabi-gcc-nm vmlinux /home/arnd/cross-gcc/lib/gcc/arm-linux-gnueabi/8.0.1/../../../../arm-linux-gnueabi/bin/nm terminated with signal 13 [Broken pipe] + local val=ac74c0f4 + [ ac74c0f4 ] + echo 2893332724 + __data_loc=2893332724 + sym_val _edata_loc + /home/arnd/cross-gcc/bin/arm-linux-gnueabi-gcc-nm vmlinux + sed -n / _edata_loc$/{s/ .*$//p;q} /home/arnd/cross-gcc/lib/gcc/arm-linux-gnueabi/8.0.1/../../../../arm-linux-gnueabi/bin/nm terminated with signal 13 [Broken pipe] + local val=ac7b8744 + [ ac7b8744 ] + echo 2893776708 + _edata_loc=2893776708 + sym_val _xiprom + sed -n / _xiprom$/{s/ .*$//p;q} + /home/arnd/cross-gcc/bin/arm-linux-gnueabi-gcc-nm vmlinux /home/arnd/cross-gcc/lib/gcc/arm-linux-gnueabi/8.0.1/../../../../arm-linux-gnueabi/bin/nm terminated with signal 13 [Broken pipe] Obviously we want to make the combination work, no idea why it doesn't. Signed-off-by: Arnd Bergmann --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) -- 2.9.0 Signed-off-by: Nicolas Pitre Tested-by: Arnd Bergmann diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 823e397ee0f3..8ed0f664f86f 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1976,6 +1976,7 @@ endchoice config XIP_KERNEL bool "Kernel Execute-In-Place from ROM" depends on !ARM_LPAE && !ARCH_MULTIPLATFORM + depends on !LTO help Execute-In-Place allows the kernel to run from non-volatile storage directly addressable by the CPU, such as NOR flash. This saves RAM From patchwork Tue Feb 20 21:59:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128973 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp5104303ljc; Tue, 20 Feb 2018 14:00:29 -0800 (PST) X-Google-Smtp-Source: AH8x224erU6qpUfe2QHXkpDFLCx6LyfHMYvcUa5mQkl6UlTCc30q8lxg3NOF7/4lZqz0Iaw1M3wn X-Received: by 2002:a17:902:ad0a:: with SMTP id i10-v6mr976256plr.130.1519164029388; Tue, 20 Feb 2018 14:00:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519164029; cv=none; d=google.com; s=arc-20160816; b=NTlY9Y8f7axHvGajNJ+Xj25Dl1WI3InQJJJw25s6a+6tmlQhWRU8SBHmDyCrTSzojm PZ8UYlI2n0TnLcZCFJJQ/NvGEVQEqAvYzHKsTM0VwzIaOKkcGYs1FkJJdjd2yEs7x939 MBY1Nxu4M+G0jJiuW30+jv0He+ytO0DIJak4q047c3IldoCUdctXEkdOAK3VKlY5EW2c 9x9FZjrWcLi6TePFrIEU3vDKZVeGO7qk6nZgXlgdZEN2C8hcRqOCSCwrnKK6nQtD6iR/ 1OkaqrmwS99FED+4JKq0x6lRMqlFiOB+l8RZAj5kYEUQF5pE5YDF9NbVJ+vhbr9uZDAS srgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=Cw/AAiNwubFW9VdU/0r3xr8yyoxRg+83PJw8yf+RoTk=; b=i65qCDiAuJbjSSQexVXs94Cq9P5pLObatabClL+Juf+XmLAE+xTZcPsKcHR/5j1KyB VIAObcYuBPGXdvlWdHCFM36IKL7ATWin8YwPViKO1nQ1JahQoGEE1mUshbke83friauj Q2HivZmnVb3j4iBY04R/g4onxt/INc1kw3S42ha2wwJ9mNSdNIKr7/QlVjLWR7IL3Gpt spGGSp64+FIS2OJe3C4zy0l/jGaL3qUFLyS+mdVjbkoYu4qhHUWWVOWvwX0sORyd5GYl cd403HRSq0/7On92QDltRmc7dyxpuWuSz3FtmhErkvwAI/GyuQMiWc5uPDES79tT3a6M 7CRQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d13si184901pgn.366.2018.02.20.14.00.28; Tue, 20 Feb 2018 14:00:29 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751221AbeBTWAT (ORCPT + 28 others); Tue, 20 Feb 2018 17:00:19 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:50007 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750735AbeBTWAS (ORCPT ); Tue, 20 Feb 2018 17:00:18 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0MHG5L-1f2IRx1ZmF-00E2MQ; Tue, 20 Feb 2018 22:59:58 +0100 From: Arnd Bergmann To: Nicolas Pitre Cc: Andi Kleen , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 2/7] ARM: LTO: avoid THUMB2_KERNEL+LTO Date: Tue, 20 Feb 2018 22:59:49 +0100 Message-Id: <20180220215954.4092811-3-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220215954.4092811-1-arnd@arndb.de> References: <20180220215954.4092811-1-arnd@arndb.de> X-Provags-ID: V03:K0:u3KJWzqET9ns5Lg+m/MiDFxCNf+0k3MQUUUfTn6++ORQZePXN1j mi6mz90RJHWy+PVhAkmNYeriJ35b4438nHM6SFXwhRhgsyXBB96WYGpwm3QP2TEatBilBtx IAk8ErVh57EmlAbnHvtWBTTKfMwUJ6jXq0i/gjvgIhsnhQy1UZ2TMUr7fytlRBnhbH60/zW p8KUauJSv6ARo5IvkBcuw== X-UI-Out-Filterresults: notjunk:1; V01:K0:lq2vHQPEv3M=:5SSk4VkGusr2hEy+y4tCo3 eTpGu9WiFscv9HdHREs8x0QHu5x0jy/xu3meN1t+p4LeX000RpuTf23cyvUIp9ibKnqYK8B2q jSdGvNhJpmFjIzraWeeev6C8Y6YfWP4Jv+gA7DM6FxfV/RRjG9E1Ohs3WCqwPTuAyOUZxjg+t HzudzChvronAoGTK9P8cBSygtoZNqZUb4MTPQiCPOk9hXH1m4n8tNYX8Bx+Ts7hOeF0whtDPw 4btdT87XipB+CIL/zLclhSTzN0vImmD8wnzQCtNRr7ijuitfbnykLWd5HroZQC3H0Bg8htsQL H+vsfKpZYAc/FCj2+ICIHNk9LKfjM/gdxylM3ex4QR28AKVQiXqXnvz4w7a8yXdtBJl/Q/U1q XeIUeYM3ygLyS8pzt3ELvplVHCLdRxtap9s89yHJdoGNwddES+RlcVFZFtSirOINeSq67+L3n TJdbvy+iJ26nVcF6IpcRXrDWeE6FwwO1JmOUVBBvtEIS2EA5h2eqyVzv1a90DSTpeKb9r5X26 C39dbtdxmoIxX24WTuZpWVyhXruDUeOZ8FUtn2HiHOnHUFGiQ+kAHdR8XQUoUXR5zcEHXc7rf llH0nCtFeOvORdyHS5+TKSwR6J4kkwrJ5vgRd4znffaF12JtHl6Jt1zhC8g9kIWWIVT8cuvZL scppz2aNVch0hVvKBqzPn9T3wtVM9SAVy1o/+Y4OhWwRnd9Ik+tyPmt25ZEYZBMu9PRxVT7zd wS0eSnUaP6KWOdsq8K+dGUUy4s9VIN1mxoFWpQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Trying to build an LTO-Enabled kernel with Thumb2 instructions failed horribly for me, with an endless output of things like ccVnNycO.s:2665: Error: thumb conditional instruction should be in IT block -- `bxne lr' ccVnNycO.s:7128: Error: thumb conditional instruction should be in IT block -- `strexeq r5,r2,[r3]' ccVnNycO.s:7258: Error: thumb conditional instruction should be in IT block -- `strexeq lr,r0,[r3]' ccVnNycO.s:17380: Error: thumb conditional instruction should be in IT block -- `strexeq r1,r2,[r6]' ccVnNycO.s:19163: Error: thumb conditional instruction should be in IT block -- `strexeq r8,r6,[r3]' ccVnNycO.s:22722: Error: thumb conditional instruction should be in IT block -- `strexeq r7,r1,[r0]' ccVnNycO.s:24105: conditional infixes are deprecated in unified syntax ccVnNycO.s:24105: Error: thumb conditional instruction should be in IT block -- `sbcccs r1,r1,r3' ccVnNycO.s:24105: Error: thumb conditional instruction should be in IT block -- `movcc r3,#0' ccVnNycO.s:24210: conditional infixes are deprecated in unified syntax ccVnNycO.s:24210: Error: thumb conditional instruction should be in IT block -- `sbcccs r2,r2,r3' ccVnNycO.s:24210: Error: thumb conditional instruction should be in IT block -- `movcc r3,#0' I did not investigate this too much, disabling Thumb2 support when LTO is set lets me build randconfig kernels. Since ARM_SINGLE_ARMV7M is Thumb2-only, I have to disallow LTO for V7-M targets. Signed-off-by: Arnd Bergmann --- arch/arm/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.9.0 diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 8ed0f664f86f..fbf2c3ab9a97 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -18,7 +18,7 @@ config ARM select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT if CPU_V7 select ARCH_SUPPORTS_ATOMIC_RMW - select ARCH_SUPPORTS_LTO + select ARCH_SUPPORTS_LTO if !ARM_SINGLE_ARMV7M select ARCH_USE_BUILTIN_BSWAP select ARCH_USE_CMPXCHG_LOCKREF select ARCH_WANT_IPC_PARSE_VERSION @@ -1533,6 +1533,7 @@ config SCHED_HRTICK config THUMB2_KERNEL bool "Compile the kernel in Thumb-2 mode" if !CPU_THUMBONLY depends on (CPU_V7 || CPU_V7M) && !CPU_V6 && !CPU_V6K + depends on !LTO default y if CPU_THUMBONLY select ARM_UNWIND help From patchwork Tue Feb 20 21:59:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128978 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp5105198ljc; Tue, 20 Feb 2018 14:01:16 -0800 (PST) X-Google-Smtp-Source: AH8x227rf/5u9AxXD81RUzpU3v7R1foxv7QQsRTFxvyKAF07zl8cOzNPLYBMej+idK0ZS4rZHEzw X-Received: by 2002:a17:902:6686:: with SMTP id e6-v6mr1000675plk.334.1519164075862; Tue, 20 Feb 2018 14:01:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519164075; cv=none; d=google.com; s=arc-20160816; b=yluHUZkaQrVMC7tLwPgY+lPwa+rHNYxEtObNNyM7hYGPvuJl8ZuSYUx8Ypb4obC6cr pGhRhisoXl68xO/xBwq1vZ4U+1qR+pa9gbAFmHU3QJGyUYtbJZrJL2QCgLOaF8//ypit IHx7aT4fvk/mKSvTaUw5LEyObaCAXYmachLCRcNj7OvIy4Vxprvlzya+EkDesbO7ZA96 hdWoNimDpKcCT96z69yIwdA/MStwL16g5IfmADxp7vrUVOjt6r8LttCvAHOj/Dciv8oZ UnWEngj9jkR6LC1s5QInsFasaSwbZBYBUUvW8Z0mYxuNeZdb0tVFJmjTEn6HKMaBi6+c wP/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=RynUHdX61rWonwDSezo6RuLC2tUDW+s+1BdhtxiEHKs=; b=tgpBEkPX1OABDbxvvBlow0IjTdIfTFZez6PoUzDTp+TQL1pKmu7v1leutb4nsRIYeS hCaxe1XCq4zb2k4HH6M+QVOplQ6ibB96OFNjt7VvvsW4+mBQ5OM+k0tyHweznF6PEzGk rdvmE11H1mSwZ4/t95qLymq/7BzmtoUv+RqKeAuwdfsnMkPS3wPRMmVQ4NGwBsRrPsY2 DzwE7+/ln+VVjbc1N29Y3vonuIHFxNhzuzL/nY3O1TwLRdqvxfogMgpfqW+FJkZt5hT7 l0ZTEd/PHbrdkLglKjEgj9csbZFSaMkE0bps4y7l6B3sBFNchNWQLy1dWGgBNShmO1Xn 6ivQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 37-v6si6108156plq.618.2018.02.20.14.01.15; Tue, 20 Feb 2018 14:01:15 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751475AbeBTWBM (ORCPT + 28 others); Tue, 20 Feb 2018 17:01:12 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:57717 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751273AbeBTWAV (ORCPT ); Tue, 20 Feb 2018 17:00:21 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0MQODc-1fBSB02hS8-00TmlV; Tue, 20 Feb 2018 22:59:58 +0100 From: Arnd Bergmann To: Nicolas Pitre Cc: Andi Kleen , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 3/7] [HACK] pass endianess flag to LTO linker Date: Tue, 20 Feb 2018 22:59:50 +0100 Message-Id: <20180220215954.4092811-4-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220215954.4092811-1-arnd@arndb.de> References: <20180220215954.4092811-1-arnd@arndb.de> X-Provags-ID: V03:K0:2jo0KNnjQFA0vHEhz+QmUaepQ1mlmpluQzE/EAn1H7/QvIH7Jzi ViH2im1R9pEKhC2Dv95f9PRRrvj3sqK+j/y3qgmjv7ITwBfRbOMBajWau7wswsoIgSMc1hJ U1m9vV8Wbni0bsezmL0YrzR1l08syn1u5NKxvFyDT2kDeB2RsCK2SMP6D/NabQkZv7YLqLA u2/m5bL6bHm61GCjgocig== X-UI-Out-Filterresults: notjunk:1; V01:K0:+KkU0vohw3Q=:hJSmopaCFGYevUdnoWXnpD jig8SDTv5gJF+jvcuMZDB3t+nwZC0jltgmNZApp6m7nfq1n6s590WtuYnSeYlEanQVDFWkjh9 slYt7I4MU+ROQIhqsrocOPcJZ2p4p9RCtqBe9csiiMhr/zKEsFcscSDn2IiNrh2ziV4gOkjpW 884+wwMU3sVb5u85xOGvlj3TYiwR76wXQIWEJxL4Rnm3b4z4NglKv2eVBowy2Il+C+K2GHETA Lhuiwod9AL/79UBkPLGOryDKYeVzpGnehzdoV4+YKJUPY3n9DeFSLHNEEJ45npBvCBpxw9BaS wBlPBgSjLZ/3j5PF2iSaRltTgUu2TIww2N7fQPhvthZ272u0b9IjZJpe612Ee+LSjYer69oJk 8vp+DNZ9GyeBOOMifEy1QxXK8RMD/WsHDyp+7mlXwlXccVFKNznrwR5ZWZ0AQDoehlEgwCMlG F3fLzDkfqla0Ovy2Upot7lNafm7oL0MAgSlxTJTFmLoNIjjhdYA2e6+kpSsBLel2sXIhVIi0w aF/5mETwzjKEDyBWisJ4DuhDjIJV3AK0/6PXyJozGfRsLwgJ83IKd7xxTXxeKpN8FeEQ8DRz7 nmESGGt+4HBiehcGkH34KzaDiLKJ3iNM41K6YlUz7LODZx+Kv5/5dlniVk+x1y/KnT5TTb8Pn 1G4UfrVaMS/dIF2KJ3czF9BQ2+A4+kGa2QmBmc/ARyuEgkkwd0L3BxDeY9JfUCD6QBlsQADWa 6WCtSv/ny9DRw5Ytzf1w9nnB7td6hS9NViB7Xw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We need some way to pass -mbig-endian to the linker during the LTO link stage, otherwise we get a waning like arm-linux-gnueabi/bin/ld: arch/arm/lib/clearbit.o: compiled for a big endian system and target is little endian for each file we link in. There is probably a better method of passing that flag, I'm just adding it to a different hack that I added earlier for x86 LTO here. Signed-off-by: Arnd Bergmann --- arch/arm/Makefile | 2 ++ 1 file changed, 2 insertions(+) -- 2.9.0 Signed-off-by: Nicolas Pitre diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 33b7eb4502aa..f39c2e2d55c0 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -49,11 +49,13 @@ endif ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) KBUILD_CPPFLAGS += -mbig-endian +KBUILD_BIARCHFLAGS += -mbig-endian CHECKFLAGS += -D__ARMEB__ AS += -EB LD += -EB else KBUILD_CPPFLAGS += -mlittle-endian +KBUILD_BIARCHFLAGS += -mlittle-endian CHECKFLAGS += -D__ARMEL__ AS += -EL LD += -EL From patchwork Tue Feb 20 21:59:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128976 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp5104752ljc; Tue, 20 Feb 2018 14:00:53 -0800 (PST) X-Google-Smtp-Source: AH8x227OjtxxBUY7Z2V8KtgQlLJ8K7liBombg10AUxMsP5wDwJCivH0TL3bld8u36oLX5ZIEQ75w X-Received: by 2002:a17:902:aa5:: with SMTP id 34-v6mr956974plp.429.1519164052982; Tue, 20 Feb 2018 14:00:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519164052; cv=none; d=google.com; s=arc-20160816; b=Eqcn1EGbW3wiZusxwIiQPxteKK7445HuXjE4095r9fGkSpEKHjog5YOC2kpgRqgIAg Cs3MvQrqNZa4t16WJdNG9d3q27ReKmz6Ect7TlQEh8+Wxt3MaOunDcz4G4fEpqZ3CCOX KYwqewphqb/kDv+xOiJbUirmSnhN++oTOdLNKkS2gxMmoydm+301iY4cIxdxxh5oXVBI 64CnNTzddHRE+TeIart2bgS7Hs36maFnw7YmD6u6vb8fXCk2AXDTeW6pZeaxQgj3OQRm ptSO60SJ63MpYrWgG6TSNqVWkFFN81t8wzja3iNNguPWfXRmqq3lnGPDh5x/p/VgVcDN D8ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=+D6Cl2w10jk0WurX8EauP8rZAwtPeoUzQ5n1dX12kTY=; b=ldW6+aOJFdpofxJsMNNTAy9Prwa5IfR0FxOaPau0TvLmSApvztT98Lk5LM5kKtgVeV F1T/+BSZK7gBpMS7IJQoatnxfwEbncsPCVUx4ljYhdcQrqc6bNZrWME7ihbCua/kPn43 kjM7SHm4oPBSlkvgOJwqi5tzEadXvPhPVWZI/K1LGdACzV+RIhmEQzC/ImWmBRpUKx7b tDyJe+ABMgR5uIsl5+CtFQspzUvJweGE6L+eJIBJmQevTc60YDn1+cWi6nV+MDlErSVU e0n2rYD3WWftlqOhnAPpO0B732Z+piur17zn7/69B+xz487SUirsDAlXbysB5PalpC36 W8Cg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u19si339645pgv.195.2018.02.20.14.00.52; Tue, 20 Feb 2018 14:00:52 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751338AbeBTWAW (ORCPT + 28 others); Tue, 20 Feb 2018 17:00:22 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:59783 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750998AbeBTWAT (ORCPT ); Tue, 20 Feb 2018 17:00:19 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0Mgw4G-1fAJ2c40A4-00M7GP; Tue, 20 Feb 2018 22:59:59 +0100 From: Arnd Bergmann To: Nicolas Pitre Cc: Andi Kleen , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 4/7] ARM: io-acorn: fix LTO linking without CONFIG_PRINTK Date: Tue, 20 Feb 2018 22:59:51 +0100 Message-Id: <20180220215954.4092811-5-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220215954.4092811-1-arnd@arndb.de> References: <20180220215954.4092811-1-arnd@arndb.de> X-Provags-ID: V03:K0:VK74VWQafS8rBr+c73a7bMHPRD+K+N8l6MVxQy43ZaVr0X2zlpp dfoLBNc6r66TvFAIBmxZWh7yAxShcxXdxFYkEy7Ts2nbXH6w+/HEqOfwbXSzHLygsnwUbvS avD5Cazvb6i75IYc43RZt63T1T3Xr3wjvnqgLGebRxeYMIn4Fl24iCNEyHUBeGpu3kt4cw+ FuXqDUtdBpsj4p/gtAGcA== X-UI-Out-Filterresults: notjunk:1; V01:K0:sPxTnOdUPr4=:FOBnhRX7YAOaJ4JmekCDuO lydEFyBTYbqKqcM1kFzfQmAC0FUx03pqpapAr+KozWxx4fm4D0nsgWTNtqVEZBI0n9o3BSorO rKtG9ErzwWb4jtmHIrKj0w7i9GJX1RWys0cGB8xWE409c998wXXAmOKdTyIfucW102htjcCoO /m20IVoDBvBKDrTi8ZKCk3x91MuhZLAMPgMCKhw3D0o2KWWFvlQ7BttYq9WXbglL8Vxt0297p BRPh66KvTqXkurGUvnoFvma9mhSr5msb8051c6vuaHQ/1WlsJ7fUdR/bhGKb+91j/W/ppB+1h eHDJMFgyV6hFGF9nHaE4102mYNFbxk9R/Tyz6iOjIx+wBr0J/2r/Ak2UPE0zExyAru1gsYEph qmMIA3bdqzsKTxqwnDln2TYQYB4U9rS2NgscR99Qwbm9ISILZUgmIU+MJJR1reXSF5DA9ZgKy 5rI1Edq0QmZy+0y78fFhke31yLGd/xCeD9RcLLxdAgw9Fkwu1NKYprCjMz81ApvI/yN+0HJ9I rnQBXeDdAPNMfJ14YoBwl0Cx//dbcyueQsoSW2jsjhlHCaALVDcVSOJELIVVYziO9VJ8R6tfe VU+04D97PErdEhhEXybCSMJ3V8Tj/AVp4F6iLroxNYXplL5Db0Zez/iXOIksk4iEJsYwAN6x4 Sq0BPS5yJYsq2JQ+Ef7wE0gKCzGKmjh5JQf0fIjrha5073CcP5w/C48ApmaBMAIfIcaQXEhT1 qGUoyg+ZM4bBlKlBXOcTpqGz62BEpY1SUKtRUpA9FObz0iZrbMIopDzg5AtpQtj+ltY1New3M DtIN8JH9JvVlVY8br5LaJlklcphEYpRje6m8oIjz920AMqbe0rlTm1iCVH3lFEIp+qJvv9wA2 aj3l3Tz9JY5ea3Fad+dnPfqBKcer+ZjMij2C9DtsOZS2FdtJVITcxKAsvkbZk9 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_LTO is enabled, we get a link error for this file that contains a reference to printk(): arch/arm/lib/io-acorn.o: In function `outsl': (.text+0x38): undefined reference to `printk' Normally the file is simply dropped, but that doesn't happen with LTO. Making the reference conditional helps, but perhaps a better fix would be to make sure the LTO linker drops the entire file in the same way that we normally do. Signed-off-by: Arnd Bergmann --- arch/arm/lib/io-acorn.S | 4 ++++ 1 file changed, 4 insertions(+) -- 2.9.0 diff --git a/arch/arm/lib/io-acorn.S b/arch/arm/lib/io-acorn.S index 69719bad674d..3522a899460b 100644 --- a/arch/arm/lib/io-acorn.S +++ b/arch/arm/lib/io-acorn.S @@ -27,6 +27,10 @@ */ ENTRY(insl) ENTRY(outsl) +#ifdef CONFIG_PRINTK adr r0, .Liosl_warning mov r1, lr b printk +#else + ret lr +#endif From patchwork Tue Feb 20 21:59:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128975 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp5104560ljc; Tue, 20 Feb 2018 14:00:43 -0800 (PST) X-Google-Smtp-Source: AH8x2267Ampl1HRhdwH3iuP/8SIMizUADU8QUWzTGt6+11jAsIixIONDGvc7x9yrtufzBQK/ipdZ X-Received: by 10.99.146.68 with SMTP id s4mr820259pgn.295.1519164042891; Tue, 20 Feb 2018 14:00:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519164042; cv=none; d=google.com; s=arc-20160816; b=gwk2mADe2NBNi2u/seX5E1087la9QYQTikwqQ20A0ne/rJ9F+VRZ2yZ84sJsYzN8Ov /kWUsjpjzJf4p92WpHw3R7SYljBbrWbottFARSyE+jyeFpt9dRyg/BzZfP0HdyM3BD+0 vW8PQDjcPMzmjOzcnHAOnrreXo/QMaX74eOZWsNBZNd3IpvxwLmNR6uy0gq1mZ2GVsOR FaI2WnF6WFLeCQozulj2mYcYRGtcjJfA3ETqE0k2tttUXnGI1382otQZyQF0aqKXkZbK u4xiX/C8/c17V6Krwsuzaf/rnsv+lszifzYS9YLfFjWp+FoDo0W0411uyPyOM+yxfO/s topw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=Wgm/WyWxaoGNNudDRkcIBmuYYdB21rpK+DX1rRVLe64=; b=uMbcGYfVQEayqFPPO8GOOmxSQzGfrOigMjXu1JAo8feCmdpWz/Z4mORCkEcPcM2cYH q7nOEAvNFfSMr1o4FwXFIOJvZuRqWB3ZPzTLaukTtQeLYnt/0j10p8xNzX4cm8DgHyLY oZcSMPrQIgt/+Yq6sMrXBwRhz5+5AH8ZfZcHZFBB+v8c842eLS0AFDAGhHem4ENqWtkT psCbYV4P/8e0Ie6uuHQrgPryfxTAELW8+cwlULWduKXYUQY9ReYedcDi+iDOu/gNqBaK UFpFxU5tIXcVyDBKNFlJ1bycrlTEdkxIjYV0MpvbiiNLu+eX6vAKd+gA/J1dR+nWrVNI nj9A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u19si339645pgv.195.2018.02.20.14.00.42; Tue, 20 Feb 2018 14:00:42 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751412AbeBTWAi (ORCPT + 28 others); Tue, 20 Feb 2018 17:00:38 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:54489 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751327AbeBTWAX (ORCPT ); Tue, 20 Feb 2018 17:00:23 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0M580s-1eYDOj16eU-00zHpr; Tue, 20 Feb 2018 22:59:59 +0100 From: Arnd Bergmann To: Nicolas Pitre Cc: Andi Kleen , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 5/7] ARM: fix __inflate_kernel_data stack warning for LTO Date: Tue, 20 Feb 2018 22:59:52 +0100 Message-Id: <20180220215954.4092811-6-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220215954.4092811-1-arnd@arndb.de> References: <20180220215954.4092811-1-arnd@arndb.de> X-Provags-ID: V03:K0:j6Z6mLTdh/+X4G+YKxS3ATVR3daU4zabNyhWk408l8/5Z67spBE n0pCT5KxKMZP6OlGOXCaY4YuZzd5g3HbUizruyCE50CaCAsxfBFR9jVQ4Eu2LQsolfPl3G4 q3lDsZjZcv6hmaVQ7MDfjV1cRrs+BKjiSgFpfI70u5wuuA7+ZFfD31tcTE5lxsh/AJs95E6 TVpmCU33xqIXuheIpHF2w== X-UI-Out-Filterresults: notjunk:1; V01:K0:4WRBaSnnQvU=:Rj3TLw5/GN9ssMjC4jMoO+ iJAgM4VFA9XC0WrCQzLMPzyCikr01S4ZHDiLzLhvAJtk7YgoBk2PT9lxQJman5mdq5/af5tGn 3ql21rvSJJ0xC3ANc92k4Lqr9s08WU5lVyaQZLwKz+ASlmtfsDL1h3NPAoKdYD2WWfmlonC8+ QUPWpbFZDHp1HJKKZVrrQ8oO8+UgrgFsJWwoUcglUVxBV0PhB5vcXtWUJhAIZtA9vJDVOJQ9t Wf7h40IIfXWSoG3NKg5r7JISuRX+0ByIt0unvE8VBsAqVORyYxP8/LYsHc61g35LTEd/YKxkv 4T+m5/p+pEBe5MzwHI3L6YxeDp7KaNkAUDhMgVGc4sAzAKu+gGvU2egPBwTVUp3cl5Gcq3yaM y+DaSTZF5gH9DyFXB4Bv8+fa04aUPN9ydwfRkEIWL5O/itpPcpuCOdqmxcoNxgW1u2jXsmTwP ovpKnXAQJgWSoDJwEHt+5c4XLriKEI6StcFm8HWHnFpdB0iMZBJvHotp5Yjk+pZkIGu46zuG2 qLtNx7IVmUiLhJQOYTivJSTrbcJ0VZ4Z9eXgrG+XV5VAeIky8nkr1Y4/2LRLevJVrl0jHgC1c ZhAYFCbzVYWbeDIRwK2bLgaWjLpkUJZ3HiO3A1fbiP9opg6mmCvJ98gEKzGnEFxjmDiRLvWjO LQu1/b6NGv7fRPNWRypRDVfEkuOuFHC4V7b17fsaRAafjZEJJOQXscsGdhP2HHIS9sfpKvMVD uICgi2PPEX47Gk4KJAbG4ClxS+ylAqiRs/0vIKiGQK037s+SKZPSMj3zqtTgnEE2B8yk/54XM HriashmaS2qdVjIahAci/6kBIDH95HMogzKRiB8hwSCkovlhaporkLeFgISLQvt0+ZO5ZFQWa gecCpyUtrUkN5HTIRhPXmEkv1O3/XalFke0PxR7ZHM3Xsbw3QI/qQW8frYnauG Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit ca8b5d97d6bf ("ARM: XIP kernel: store .data compressed in ROM") moved the decompressor workspace to the stack and added a compiler flag to avoid the stack size warning. With LTO, that warning comes back. Moving the workspace into an initdata variable avoids that warning but presumably also undoes the optimization. We could also try disabling the warning locally in that file with _Pragma("GCC disagnostic"), but we lack a little bit of infrastructure to do that nicely. Signed-off-by: Arnd Bergmann --- arch/arm/kernel/Makefile | 3 --- arch/arm/kernel/head-inflate-data.c | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) -- 2.9.0 diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index b59ac4bf82b8..2e8d40d442a2 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile @@ -88,9 +88,6 @@ head-y := head$(MMUEXT).o obj-$(CONFIG_DEBUG_LL) += debug.o obj-$(CONFIG_EARLY_PRINTK) += early_printk.o -# This is executed very early using a temporary stack when no memory allocator -# nor global data is available. Everything has to be allocated on the stack. -CFLAGS_head-inflate-data.o := $(call cc-option,-Wframe-larger-than=10240) obj-$(CONFIG_XIP_DEFLATED_DATA) += head-inflate-data.o obj-$(CONFIG_ARM_VIRT_EXT) += hyp-stub.o diff --git a/arch/arm/kernel/head-inflate-data.c b/arch/arm/kernel/head-inflate-data.c index 6dd0ce5e6058..b208c4541bd1 100644 --- a/arch/arm/kernel/head-inflate-data.c +++ b/arch/arm/kernel/head-inflate-data.c @@ -35,10 +35,11 @@ extern char _sdata[]; * stack then there is no need to clean up before returning. */ +static __initdata struct inflate_state state; + int __init __inflate_kernel_data(void) { struct z_stream_s stream, *strm = &stream; - struct inflate_state state; char *in = __data_loc; int rc; From patchwork Tue Feb 20 21:59:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128977 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp5104937ljc; Tue, 20 Feb 2018 14:01:03 -0800 (PST) X-Google-Smtp-Source: AH8x224j4YDY/qcVc2NrIPmgUxYac2tmG5379TGiQRs0XgzYGgYp1Qs+IL5hQgYYFxarJqW1Jga/ X-Received: by 10.101.93.15 with SMTP id e15mr817952pgr.175.1519164063709; Tue, 20 Feb 2018 14:01:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519164063; cv=none; d=google.com; s=arc-20160816; b=a2Y8qI5YW9evHn2DxEvUvcV5d/fGu68nla2omlf7HsAOOCi97vrVP4+oUW1hU4NM4a yuww8F2kac2NYis3KilVflUFDHRogHcj04Qv56wGE5Mt0zJVjgbKZ5k+7C0dFqQxU+SE 5rUEAMRrryoT3MRsFxyQao5GeD5dBopkeVQEYqwrhUNwIOwIsWskoZUQAiX751Ftcp1A rF8j7PTgxTq7jnbASfzGEujEG3ryfQDiQPeQkrnERMo0M5kbLxDc6d2Rk9UeU83LKK+2 /J21f1957KyzFMFyzq9iAGT+wT5iYeMVvf47tL1pmBzqvk2ww2CKyFfJeMlGt1dfduFG NeMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=KusdX/ooAGPS6p8IFnKsEzFSlhRAtjo0VCPB7sTQtiY=; b=W/cS8KSKqj0nmb69yXvgX6tGYkP8SzzSV3OW+Ol+JWeReQnLdizD2niZOqK4wQ+vl9 +K774hbIhh4qpuGFR0Fbr8ZLps86uTVT0BWtEMbL0Za8njBtjbJRos34CeBxrVsUVwb7 55Y/lNgYQaqOqtekMFAk1uYqh/Snd3NI5EGBxWC0KN3fk2uMxOWOXReKlMGAN1dBzDYZ 6tsznHvaCxEPWr9kQk70a7GVa9j6TCcG0BDxJUbcjo/Dw05TbbzMr43OCoFsXKMnnT3o 6RBLs8SETONkAQR81lvpezNcl93Hij4JDTPD9QRqZaQMizgVWR6a9+aSRYDi2VR5vEiB KFUg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3si8431781pgc.496.2018.02.20.14.01.02; Tue, 20 Feb 2018 14:01:03 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751446AbeBTWA6 (ORCPT + 28 others); Tue, 20 Feb 2018 17:00:58 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:36949 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751270AbeBTWAV (ORCPT ); Tue, 20 Feb 2018 17:00:21 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0LlVlX-1eEeLo2GM3-00bJy6; Tue, 20 Feb 2018 22:59:59 +0100 From: Arnd Bergmann To: Nicolas Pitre Cc: Andi Kleen , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 6/7] ARM: mark assembler-referenced symbols as __visible Date: Tue, 20 Feb 2018 22:59:53 +0100 Message-Id: <20180220215954.4092811-7-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220215954.4092811-1-arnd@arndb.de> References: <20180220215954.4092811-1-arnd@arndb.de> X-Provags-ID: V03:K0:98fF4dxuPuMH2iQr/JTc4GFqhtRk99Rc8Kf/Dz1RT9gj9rzXhgD JTQRSOuIqhB06srRjQi6+BEOMpkAn4RO2obJP/bs1fe1bFHjHMmk3fUW0RGcMMVEbX0IgLI Rt1gbtzzmyJ33cyu8l+ZP/1XiJRXO/9kxUGJEr5b879sBWVvPfjcBJHklJltuzwKbHb93Go cdPm7/uN7/yzicqyyz2vA== X-UI-Out-Filterresults: notjunk:1; V01:K0:MVVCzsqSKDg=:5UsfVQ+yXs8AhnWiEpcSEL avtpcnXG+iCd37xfDLnMrwEPzBLrn4BoLVFKBNh+BrhV1tcYBn/MZqh+N9gFnR2HfYeg3pfZv Ktof/Z0x+5BEC7MpxFwAlav48uSFnBXVIOB8z7G3eUuMJTuPsV8cG0Bu2Mw1y0Oxz1a3TdTGJ TsmrgjHDGafdUmytHQAspuVGp8jVSBL2ioyXc65T2XMq3S6a1UHPjePkrJt6q83riohQkadxf wi4utViMIpLmfjyA4pCBNGhc4gUyheJaDkTNXZSldm9EWnGV9CwbH6oY/yAAHIdtGRmnQ1pZi 63kT/nUL8h6QEGbTRt5qn0ejQVLRBwr8Qa2keeBqnOKo8WNnY6nf15xNfAfo+Y9FpD+Y5RYQJ 9Hwdh5RaEfot0dYKJ0m+Py0ciLxxejcNH2i0rx9VqiiTV5aQxVqoBZW/8phOiNxLRH9RLPak8 A0kvbWa8UHyBKSwK/fLI1HKZiubpnVmuFOj+gm0DL5CZrJCrt+IkeWeofpNoKL9slLKvLWgSF a+8HFEFbfyZB7pmJuL/ss3S9ewM1hnXivpC+Ysutb4KCEztX7YszJyN76Btwlg+dZvGyywYxM jNcufS925A3V7fVxms32EDlVyjwGs9LZcPhPm5UooRBlqoBqBASFryQtySxgOmNxY0kvffN3B X/sPKm9e/jJytnStcisAq/ijbledycsCWlacXUCfK/oxFPUxQ/q1VdRmMdlvvOezfmjgg5JS1 1ZK+nJkteZujy1cETwq5T0VsJZSKgGPR3CkDFA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I got link errors for references to local symbols from inline assembler, and also for referencing local symbols inside of inline assembler fragments from C. In both cases, making the symbols globally visible fixes the link process, but this seems a bit ugly, so I hope there is a better way to do this. Signed-off-by: Arnd Bergmann --- arch/arm/kernel/process.c | 2 +- arch/arm/kernel/suspend.c | 2 ++ arch/arm/kernel/unwind.c | 1 + arch/arm/probes/kprobes/core.c | 2 +- arch/arm/probes/kprobes/test-core.c | 11 ++++++----- arch/arm/vdso/vgettimeofday.c | 2 ++ drivers/bus/arm-cci.c | 6 +++--- drivers/soc/bcm/brcmstb/pm/pm-arm.c | 2 +- lib/clz_ctz.c | 20 ++++++++++---------- 9 files changed, 27 insertions(+), 21 deletions(-) -- 2.9.0 diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 1523cb18b109..38969cb279df 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c @@ -41,7 +41,7 @@ #ifdef CONFIG_CC_STACKPROTECTOR #include -unsigned long __stack_chk_guard __read_mostly; +unsigned long __stack_chk_guard __read_mostly __visible; EXPORT_SYMBOL(__stack_chk_guard); #endif diff --git a/arch/arm/kernel/suspend.c b/arch/arm/kernel/suspend.c index a40ebb7c0896..6679ffa0a3ef 100644 --- a/arch/arm/kernel/suspend.c +++ b/arch/arm/kernel/suspend.c @@ -16,6 +16,7 @@ extern int __cpu_suspend(unsigned long, int (*)(unsigned long), u32 cpuid); extern void cpu_resume_mmu(void); #ifdef CONFIG_MMU +__visible int cpu_suspend(unsigned long arg, int (*fn)(unsigned long)) { struct mm_struct *mm = current->active_mm; @@ -41,6 +42,7 @@ int cpu_suspend(unsigned long arg, int (*fn)(unsigned long)) return ret; } #else +__visible int cpu_suspend(unsigned long arg, int (*fn)(unsigned long)) { u32 __mpidr = cpu_logical_map(smp_processor_id()); diff --git a/arch/arm/kernel/unwind.c b/arch/arm/kernel/unwind.c index 0bee233fef9a..e3bc44b35028 100644 --- a/arch/arm/kernel/unwind.c +++ b/arch/arm/kernel/unwind.c @@ -55,6 +55,7 @@ void __aeabi_unwind_cpp_pr0(void) }; EXPORT_SYMBOL(__aeabi_unwind_cpp_pr0); +__visible void __aeabi_unwind_cpp_pr1(void) { }; diff --git a/arch/arm/probes/kprobes/core.c b/arch/arm/probes/kprobes/core.c index e90cc8a08186..70ce40b5aa40 100644 --- a/arch/arm/probes/kprobes/core.c +++ b/arch/arm/probes/kprobes/core.c @@ -242,7 +242,7 @@ singlestep(struct kprobe *p, struct pt_regs *regs, struct kprobe_ctlblk *kcb) * kprobe, and that level is reserved for user kprobe handlers, so we can't * risk encountering a new kprobe in an interrupt handler. */ -void __kprobes kprobe_handler(struct pt_regs *regs) +void __kprobes __visible __used kprobe_handler(struct pt_regs *regs) { struct kprobe *p, *cur; struct kprobe_ctlblk *kcb; diff --git a/arch/arm/probes/kprobes/test-core.c b/arch/arm/probes/kprobes/test-core.c index 9ed0129bed3c..bc40eededab9 100644 --- a/arch/arm/probes/kprobes/test-core.c +++ b/arch/arm/probes/kprobes/test-core.c @@ -245,6 +245,7 @@ static void __used __naked __arm_kprobes_test_func(void) __asm__ __volatile__ ( ".arm \n\t" ".type arm_func, %%function \n\t" + ".globl arm_func \n\t" "arm_func: \n\t" "adds r0, r0, r1 \n\t" "mov pc, lr \n\t" @@ -917,7 +918,7 @@ static void coverage_end(void) * Framework for instruction set test cases */ -void __naked __kprobes_test_case_start(void) +void __naked __used __visible __kprobes_test_case_start(void) { __asm__ __volatile__ ( "mov r2, sp \n\t" @@ -934,7 +935,7 @@ void __naked __kprobes_test_case_start(void) #ifndef CONFIG_THUMB2_KERNEL -void __naked __kprobes_test_case_end_32(void) +void __naked __used __visible __kprobes_test_case_end_32(void) { __asm__ __volatile__ ( "mov r4, lr \n\t" @@ -951,7 +952,7 @@ void __naked __kprobes_test_case_end_32(void) #else /* CONFIG_THUMB2_KERNEL */ -void __naked __kprobes_test_case_end_16(void) +void __naked __used __visible __kprobes_test_case_end_16(void) { __asm__ __volatile__ ( "mov r4, lr \n\t" @@ -966,7 +967,7 @@ void __naked __kprobes_test_case_end_16(void) ); } -void __naked __kprobes_test_case_end_32(void) +void __naked __used __visible __kprobes_test_case_end_32(void) { __asm__ __volatile__ ( ".arm \n\t" @@ -1315,7 +1316,7 @@ static unsigned long next_instruction(unsigned long pc) return pc + 4; } -static uintptr_t __used kprobes_test_case_start(const char **title, void *stack) +uintptr_t __used __visible kprobes_test_case_start(const char **title, void *stack) { struct test_arg *args; struct test_arg_end *end_arg; diff --git a/arch/arm/vdso/vgettimeofday.c b/arch/arm/vdso/vgettimeofday.c index b79dc05b0b4d..df7e4b4d8719 100644 --- a/arch/arm/vdso/vgettimeofday.c +++ b/arch/arm/vdso/vgettimeofday.c @@ -273,6 +273,8 @@ void __aeabi_unwind_cpp_pr0(void) { } +__visible +void __aeabi_unwind_cpp_pr1(void); void __aeabi_unwind_cpp_pr1(void) { } diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c index 5426c04fe24b..e149590bce50 100644 --- a/drivers/bus/arm-cci.c +++ b/drivers/bus/arm-cci.c @@ -1842,7 +1842,7 @@ struct cci_ace_port { struct device_node *dn; }; -static struct cci_ace_port *ports; +struct cci_ace_port *ports; static unsigned int nb_cci_ports; struct cpu_port { @@ -1877,7 +1877,7 @@ static inline bool cpu_port_match(struct cpu_port *port, u64 mpidr) return port->mpidr == (mpidr & MPIDR_HWID_BITMASK); } -static struct cpu_port cpu_port[NR_CPUS]; +struct cpu_port cpu_port[NR_CPUS]; /** * __cci_ace_get_port - Function to retrieve the port index connected to @@ -2027,7 +2027,7 @@ EXPORT_SYMBOL_GPL(cci_disable_port_by_cpu); * any failure this never returns as the inability to enable the CCI is * fatal and there is no possible recovery at this stage. */ -asmlinkage void __naked cci_enable_port_for_self(void) +asmlinkage void __naked __visible cci_enable_port_for_self(void) { asm volatile ("\n" " .arch armv7-a\n" diff --git a/drivers/soc/bcm/brcmstb/pm/pm-arm.c b/drivers/soc/bcm/brcmstb/pm/pm-arm.c index dcf8c8065508..863f3a6b2279 100644 --- a/drivers/soc/bcm/brcmstb/pm/pm-arm.c +++ b/drivers/soc/bcm/brcmstb/pm/pm-arm.c @@ -400,7 +400,7 @@ static int brcmstb_pm_s2(void) * generate stack references on the old stack). It cannot be made static because * it is referenced from brcmstb_pm_s3() */ -noinline int brcmstb_pm_s3_finish(void) +__visible noinline int brcmstb_pm_s3_finish(void) { struct brcmstb_s3_params *params = ctrl.s3_params; dma_addr_t params_pa = ctrl.s3_params_pa; diff --git a/lib/clz_ctz.c b/lib/clz_ctz.c index 2e11e48446ab..516751d12217 100644 --- a/lib/clz_ctz.c +++ b/lib/clz_ctz.c @@ -16,31 +16,31 @@ #include #include -int __weak __ctzsi2(int val); -int __weak __ctzsi2(int val) +int __visible __ctzsi2(int val); +int __visible __ctzsi2(int val) { return __ffs(val); } EXPORT_SYMBOL(__ctzsi2); -int __weak __clzsi2(int val); -int __weak __clzsi2(int val) +int __visible __clzsi2(int val); +int __visible __clzsi2(int val) { return 32 - fls(val); } EXPORT_SYMBOL(__clzsi2); -int __weak __clzdi2(long val); -int __weak __ctzdi2(long val); +int __visible __clzdi2(long val); +int __visible __ctzdi2(long val); #if BITS_PER_LONG == 32 -int __weak __clzdi2(long val) +int __visible __clzdi2(long val) { return 32 - fls((int)val); } EXPORT_SYMBOL(__clzdi2); -int __weak __ctzdi2(long val) +int __visible __ctzdi2(long val) { return __ffs((u32)val); } @@ -48,13 +48,13 @@ EXPORT_SYMBOL(__ctzdi2); #elif BITS_PER_LONG == 64 -int __weak __clzdi2(long val) +int __visible __clzdi2(long val) { return 64 - fls64((u64)val); } EXPORT_SYMBOL(__clzdi2); -int __weak __ctzdi2(long val) +int __visible __ctzdi2(long val) { return __ffs64((u64)val); } From patchwork Tue Feb 20 21:59:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128979 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp5105549ljc; Tue, 20 Feb 2018 14:01:35 -0800 (PST) X-Google-Smtp-Source: AH8x22742eaiiy5lqdLHFNRd3YuTEOFwH5LxOaAJz9J2sy0cPtA/jC0h2Flp9rXYnAbiKKh+X4XD X-Received: by 10.99.120.193 with SMTP id t184mr865252pgc.348.1519164094900; Tue, 20 Feb 2018 14:01:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519164094; cv=none; d=google.com; s=arc-20160816; b=CVMoqAVEZN4h9Go90zMyhf4zU3FLQGk/8F5Ll9mGqGH42M6u8BCrTIEurl2C+GsmXS ODgc/uLTXKlVAfJuPM9kZDMb16g7Sz4jpPfXL8Qt+V5ph+kVcy/yuxNq2eYSKuzHRrV3 3lb07mfviyJ4Aw4YwmDxdZ5puEHw5BxTNTtLUnE2wjjr2SMd2RpYlV10FzKw5NG3PiI3 Ajgby43J3IZdB/Ns4WSUQ4e3HQOvyDiRKqnfIxlpQjGe2qJfsP2gPGI/kM8AehcXvvXX MPFuG9Tyow0gbyz6LslBov2w+F+kji8E8WIFKzwbLBiT+O71Sw6VYHATOKWiLUgOntgq 6ssw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=rXD5n4a95KAVVs1tORhSDXhgUkZo86wIcdGLqPa9g04=; b=Ba17ROVYkmHcsfTE5xR8TYH6/BlTwIi0o3gHYagUgknUSNmcnu9L9xev+BSeSBhL2X Xir1iXzpPNfBo0Pwxuiu53aZv+uHwUNZkH3kJf/7ew5pYe6qkjkHE2TDlsunidJuuZgI pbmPHjptk4Xx4XUxs6lm1AUj2CnzdhfXig+/fUMtVmmD7dNuAp0YTwDmKp/OWDMl6muI pKJoeCaCEL9k5kYeLjAZTzFyyi6KcWbWHfh7OcGhC+uN1iuOtximD4j8gjmcwpVaPlq+ hD35MzXLDr5xt/tPOWw5QnmuTQ2WgkgcfmBXAu5RrGKexuzTSR9PL10lEj+J3/JvLW8P 2VlQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l69si16758pfk.180.2018.02.20.14.01.34; Tue, 20 Feb 2018 14:01:34 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751522AbeBTWB3 (ORCPT + 28 others); Tue, 20 Feb 2018 17:01:29 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:41189 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750735AbeBTWAU (ORCPT ); Tue, 20 Feb 2018 17:00:20 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0M731J-1ea9TW3Mu5-00wp7o; Tue, 20 Feb 2018 22:59:59 +0100 From: Arnd Bergmann To: Nicolas Pitre Cc: Andi Kleen , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 7/7] efi: disable LTO for EFI stub Date: Tue, 20 Feb 2018 22:59:54 +0100 Message-Id: <20180220215954.4092811-8-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220215954.4092811-1-arnd@arndb.de> References: <20180220215954.4092811-1-arnd@arndb.de> X-Provags-ID: V03:K0:g/CEMVWePhNFebbS+t3z1ahrGqtz52H1ciUl2QfOtEWWz189hrF 4UCDqVTe7lzPHA/3cPChJS5omNkjfn6l0U9FWwL6u6g+z43ydixs/vZgjY4Jk63ZoAtdju4 t5ZVWikTJVzodXA8fFtI7Gw1oNKNxMCEy0RXZMY1mQiCJaV0VWRAJJJrZatxBloI2un4gRs mKwsxGFkipoawu2cvx6fA== X-UI-Out-Filterresults: notjunk:1; V01:K0:qVyq8I0Ua8E=:N1BiRs+SuUxLrxbDlsW+tD U8aOzfvOdGyUXfeZqUyZuElzqVGyUeUzh/XHRwF9oCA35GSmwYdP73dgrJ+Bh9x4j0StXz0Ir ogrKmNS1zGPhSBAFdBxsA+EuZkhwJp6/AsNJ2cY3Hexrm7AMS+nf/ncVSWgdOsnmynne+Kcud y2wEBexYipchH9F+9nT74oTh9E0sI+h3khlwXA5+Dcwj3xL1ZOWaOVGXSnf5GkV5+sm3KHebD YXAnDhicFcx23CADmra77KV4cLuM9c45n25VfVGjcOL5/k6kzWxsN+8ablblcHRHkEKRivRcK A5xGdJVNWhxIxkakN4d2oNsVzydgcnkK39A/sBUFpu5ZnnbH57TRo3sd78XymheYIxLkS8Kbi TtB6fDw2gXvuvKWsAXuR2QTa66bJ/jHdLvu2ssxfsA4Ot1tiaifz6vRofBX0c5V8B3Y8bTnJO n5ZfH0yYZDH73hpBBvwWdx42foqMxZJdL6LV/XcvXYuIL5xrrMNg8M0j07ddX6eae0TWkuuzA /0uusBtLo93Pu7LQvO0C+sZUgAlX23aGTE3Iavat/CfutbLBFX0t2HyYYT1/uIGmRBgIp/Cbb YLwiyyjdeE/RLRoFjGJKPdwjN9o5V8pdRPPsKfCCMPmQk/nVIOpBksGwiRikGQHP/xvVy9/nj J3EUcJpO9HzungfLoNxPiFyIA1bdkWZ9KS7bWkhAxrHkexrXGNRx8h6HJ/XDffOBSMQbxPA4U MrAmGGjzkwRQJppxelHtEy+ChKQ7OrFavAPWJw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Building the EFI stub on 32-bit ARM with LTO resulted in a build error: arm-linux-gnueabi-ld: drivers/firmware/efi/libstub/arm-stub.stub.o: plugin needed to handle lto object arch/arm/boot/compressed/head.o: In function `efi_stub_entry': Locally disabling LTO for this directory seems to do the trick. Signed-off-by: Arnd Bergmann --- drivers/firmware/efi/libstub/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.9.0 diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile index 7b3ba40f0745..cc4c53f1ff0a 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -20,7 +20,9 @@ cflags-$(CONFIG_EFI_ARMSTUB) += -I$(srctree)/scripts/dtc/libfdt KBUILD_CFLAGS := $(cflags-y) -DDISABLE_BRANCH_PROFILING \ -D__NO_FORTIFY \ $(call cc-option,-ffreestanding) \ - $(call cc-option,-fno-stack-protector) + $(call cc-option,-fno-stack-protector) \ + $(DISABLE_LTO) + GCOV_PROFILE := n KASAN_SANITIZE := n