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