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: 10230919 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0F95860392 for ; Tue, 20 Feb 2018 22:02:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F275E28944 for ; Tue, 20 Feb 2018 22:01:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E727328947; Tue, 20 Feb 2018 22:01:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8091728944 for ; Tue, 20 Feb 2018 22:01:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=xyTCa8Nl3uyMjPx4c7sYR2mq1zafS9ix4Lh1Lmid0JI=; b=EQJI9EZaQMETwXABFzmYtdrtjY 7Z5PXBTkSWWWdbQXSoXMXOKtl6UkQ2v0sTo3ucdKNnH2L7xDiNZwp4xm8nwUipiE9RX/4k3mgq8Gh jUEhOn0h71/yBZ9w7ibWacliQsZPkgvNp0e/wuj0/cGmck0ENfHjlUrC6cxQA8PF7r0d+zXrEsxrp YU2BfgnwQ1VbevYfaVL8BaaXbB4GafCS5owi+3AiAaP12AkF9q0oAUxmb0xC24noUMdbYmZjmeYFb BR3x6Udi9y0YRRpiXeeTpU2nlQwoB3gBN2irxzSlvhsMXj4C0P9swMC1yknbx8oZCKBpwtWukBE8D BImBDigg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eoFyo-00070A-Cm; Tue, 20 Feb 2018 22:01:42 +0000 Received: from mout.kundenserver.de ([217.72.192.73]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eoFxO-00056x-JK for linux-arm-kernel@lists.infradead.org; Tue, 20 Feb 2018 22:00:18 +0000 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 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 avD5Cazvb6i75IYc43RZt63T1T3Xr3wjvnqgLGebRxeYMIn4Fl24iCNEyHUBeGpu3kt4c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709E3 X-CRM114-CacheID: sfid-20180220_140014_989450_9DA8CE5B X-CRM114-Status: GOOD ( 10.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andi Kleen , Arnd Bergmann , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(+) 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