Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5371414rwb; Mon, 14 Nov 2022 03:48:21 -0800 (PST) X-Google-Smtp-Source: AA0mqf7pxzinLsem6Xfb2hsQJYgmK5LbMtS0SdCFJt97b0R64zCLkyYyUAVQ3PvCicZMIUbXQZdJ X-Received: by 2002:a17:902:6945:b0:186:9870:506a with SMTP id k5-20020a170902694500b001869870506amr13333102plt.45.1668426501602; Mon, 14 Nov 2022 03:48:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668426501; cv=none; d=google.com; s=arc-20160816; b=YwgDJvgGjudUHP8yebAXW9xrL/sPArosKF07K1MZd//1fuL32Mn+q3UzJlMxYXmLfB tGwEWWCnUuLlKgc3FYb2SROiyfH3f/wNw80GPrU5M31t2Qhv4FQysxWkkQK0ORT3Gr89 8oMNnuW9nDXhg44Dfy3XRbsNJnclcEpVj3KDyAeW3WsjcMm6JuzpiYgPdD9kinsyCwln SV1AON+j+l/qy2gY7pTmgAVuRpJnARcrXK34xWDU9fcFdLSkKuw6YOVUaYqsiOEFu6d1 vWArzs9YS6mIiHbHwuAuMpIAJSvlr5adSaeWSZX3iquvP7skUHry/osr1wCyAeVL3KaO QyPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=G3dcUGrqFUNYr+g3SOOFTJ0AQSjhDA9a5VuVOPYNJ1A=; b=F0InZwVsvL0WOVzkQe54w+fIs7T2L6TD8Vj9sii4bNo16+mhypjiLlDazLda2qnl5K 1qVqgqHQ/LZFNS4onCt0Vvl2csGxID0ZMdfb+OMmz7svEET4cSELzxWfFvYnCv0qtJ4/ +Ahvez7oFdDD0jXioSqOPeZMloda3uQkbVpBueE9oTB4AImGgybDZrJOTg0Ce7cIDvKy 1XzjrmFI+hthWCI4Qw/WzJc+m30BUTvE771De9JNTtp0LIW9zjk6pMVjAZWOBB9o36Ha iuTca3YQAD/eDeIBU8mHnH/h7KFMQYXKbXT2cby2G63hmv4G6ISWTOVoXT0xFFQBAoRH B4yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="pQCj9Bl/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y10-20020a17090322ca00b00186e114bedfsi10690518plg.126.2022.11.14.03.48.10; Mon, 14 Nov 2022 03:48:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="pQCj9Bl/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236453AbiKNLo5 (ORCPT + 88 others); Mon, 14 Nov 2022 06:44:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236634AbiKNLo3 (ORCPT ); Mon, 14 Nov 2022 06:44:29 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DB09F59C for ; Mon, 14 Nov 2022 03:44:17 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5E980B80E6C for ; Mon, 14 Nov 2022 11:44:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A04BC433C1; Mon, 14 Nov 2022 11:44:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668426255; bh=b5Apr9ljbPWXptKX2Y7oDbgatIEtz07LMj4Vds3jeiU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pQCj9Bl/KCEzOwGmBs7/yB++JsW34aqew8j6gYUQ5Kt736lR1XZqCE8OHv/HBtIqm +Hylb+ZnLUG8vo+93hauKmemG/BIuRN9R8oG15YbQ6Y0tW7gQbwKVr4ch0Ps6rC+WS 6N6tqZBRzgDyQEZ+DQMlBam1XDYzFf0h2RrfputJVlpXjFsVsPau0r7kJL158UCmeE 2OJ0Iz0OWPYpfKqqnErjLr1tOfG5a9hlIcDGpwUpmN7YLxuwVYH1/X+oYuXda40NWF DK50WjQLbBBP3Wl9U5Sn1fNthDyc1ptIdhp79x2liWt9Tr5DCqZ501qDHuPRPDSi2G uNg9OxmKfTRtQ== From: "Jiri Slaby (SUSE)" To: linux-kernel@vger.kernel.org Cc: Andi Kleen , Peter Zijlstra , Josh Poimboeuf , Jason Baron , Steven Rostedt , Ard Biesheuvel , Martin Liska , Jiri Slaby Subject: [PATCH 09/46] static_call, lto: Mark static_call_return0() as __visible Date: Mon, 14 Nov 2022 12:43:07 +0100 Message-Id: <20221114114344.18650-10-jirislaby@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221114114344.18650-1-jirislaby@kernel.org> References: <20221114114344.18650-1-jirislaby@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andi Kleen Symbols referenced from assembler (either directly or e.f. from DEFINE_STATIC_KEY()) need to be global and visible in gcc LTO because they could end up in a different object file than the assembler. This can lead to linker errors without this patch. So mark static_call_return0() as __visible. Cc: Peter Zijlstra Cc: Josh Poimboeuf Cc: Jason Baron Cc: Steven Rostedt Cc: Ard Biesheuvel Signed-off-by: Andi Kleen Signed-off-by: Martin Liska Signed-off-by: Jiri Slaby --- kernel/static_call.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/static_call.c b/kernel/static_call.c index e9c3e69f3837..9197fe86d8bd 100644 --- a/kernel/static_call.c +++ b/kernel/static_call.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 #include -long __static_call_return0(void) +__visible long __static_call_return0(void) { return 0; } -- 2.38.1