Message ID | 20221114114344.18650-8-jirislaby@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2097427wru; Mon, 14 Nov 2022 03:47:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf6EdaLYFZo1QMaNOviw+qenjoHXcq7MvC0BpTZ0EIJC7rFC0AH78YPkTxYKVJJcWQPKxDiP X-Received: by 2002:a65:6094:0:b0:458:6f51:ff7b with SMTP id t20-20020a656094000000b004586f51ff7bmr11473461pgu.153.1668426422882; Mon, 14 Nov 2022 03:47:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668426422; cv=none; d=google.com; s=arc-20160816; b=xMu8JQuWqe204WKxS/0juzEctgx1WOZwmEZ7CEcnchxh+uJuEuHy4HPExPvA++qMHF OE4awsAuR030tnrRl4WBrKxShmW1OQjET9XtFEyL9WhUH8+NxrOKoC+3OKgDHi96d0dy 164U70xb61XJ0saOSIeb4FeKwgXWtsNRfav/GZxkRSNMvwHvNTaFPVcKB2KJiiWWTviW 72lIz8mGYnRS5W7I9Dsva8XPSd+6egbrlFcb2/lPC15wN7xQ5spQq8CmdEOkEXIVH6xg /mkLUixcimmvT39CdTymh4r2Km8ZtuEiUYm2/4RNFRwY4EGIDhfsn1uaStFX8FUc8uDr zx2w== 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=/C1rRht6cpUrGqbWw+Iz8rrX370K6XaYob5EjEQdAik=; b=v/5wb/kFEnjq3CnGi1z2WPi1S0J7e953VJYrV7OScKz2l9s9ZZRAPunZxE1wes7AbX 0lTIOVcW7qjdekGL+Td7V/4EzPeE/ja5ltkep1gkcckG+Uo/WsP9ZQd3AOevK7yTzzXw US+e7S9O2QLLU5CgeigeFhBd4qIRS6e0CV0gkCTbY6DGv/wBz4b/QgG1Mnflr9lPxFay j8ZB8FjXJSkfXtQmTLatjxpmiX4G3LuoRN76Sz386vSa+Ce2eCgn5z/a4YnE8eMtvn4R CUhcMVHsao1gQWuRtm7DuFdKi8N0urwOO2OVz1MqomEEnxXFY2eZesXfOMtZvf4BfXf/ J4ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JsQd0SZ8; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i5-20020a1709026ac500b00174de06d92csi8542759plt.74.2022.11.14.03.46.49; Mon, 14 Nov 2022 03:47:02 -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=JsQd0SZ8; 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 S236659AbiKNLoe (ORCPT <rfc822;winker.wchi@gmail.com> + 99 others); Mon, 14 Nov 2022 06:44:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236588AbiKNLoV (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 14 Nov 2022 06:44:21 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1DCA21244 for <linux-kernel@vger.kernel.org>; Mon, 14 Nov 2022 03:44:12 -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 78241B80E70 for <linux-kernel@vger.kernel.org>; Mon, 14 Nov 2022 11:44:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6323C433D7; Mon, 14 Nov 2022 11:44:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668426250; bh=E3kz6aXy90ssypKzOgGT2am24tCg/w/PReJqhb9mnbM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JsQd0SZ89H+7uMm60Tc7tgzG1ECnHpVa1m0rVKPMJwrQEil5TJFTb3j8QOczdAPMM NuHOLOE6InURkI0wviASS+aOoF2WuPyQj3KInhC6tHVQIRD03GSOtPRI75eawVMtJx xYDKTeF+gV/KeI1drOd0JIOky/k7ubR/oiMfWhQk2I5tGVQ1uUYslfqXky7YbFk0Ip WlIioBSrWtDHo46wCcdfJjsqnMdU4udcLBgneN3qlda/CZw+fu8zNENse9T8yOoGK0 n4sPxu3c6d/mL2n/ldgK/VCjvGJpTPm+QsFM6mSmNg8BuOqAyirBtjEHM5KZM5CoOw I1BEVn7weUpGw== From: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> To: linux-kernel@vger.kernel.org Cc: Andi Kleen <andi@firstfloor.org>, Steven Rostedt <rostedt@goodmis.org>, Martin Liska <mliska@suse.cz>, Jiri Slaby <jslaby@suse.cz> Subject: [PATCH 07/46] tracepoint, lto: Mark static call functions as __visible Date: Mon, 14 Nov 2022 12:43:05 +0100 Message-Id: <20221114114344.18650-8-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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749471905153790088?= X-GMAIL-MSGID: =?utf-8?q?1749471905153790088?= |
Series |
gcc-LTO support for the kernel
|
|
Commit Message
Jiri Slaby
Nov. 14, 2022, 11:43 a.m. UTC
From: Andi Kleen <andi@firstfloor.org> 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 functions as __visible, namely tracepoints here. [js] unify the __visible placement Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Andi Kleen <andi@firstfloor.org> Signed-off-by: Martin Liska <mliska@suse.cz> Signed-off-by: Jiri Slaby <jslaby@suse.cz> --- include/linux/tracepoint.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index 4b33b95eb8be..1ce0655f0c9c 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h @@ -239,7 +239,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p) * poking RCU a bit. */ #define __DECLARE_TRACE(name, proto, args, cond, data_proto) \ - extern int __traceiter_##name(data_proto); \ + extern __visible int __traceiter_##name(data_proto); \ DECLARE_STATIC_CALL(tp_func_##name, __traceiter_##name); \ extern struct tracepoint __tracepoint_##name; \ static inline void trace_##name(proto) \ @@ -306,7 +306,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p) .unregfunc = _unreg, \ .funcs = NULL }; \ __TRACEPOINT_ENTRY(_name); \ - int __traceiter_##_name(void *__data, proto) \ + __visible int __traceiter_##_name(void *__data, proto) \ { \ struct tracepoint_func *it_func_ptr; \ void *it_func; \