From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id 661DB3857359; Wed, 4 May 2022 12:41:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 661DB3857359 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Martin Liska To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/marxin/heads/lto-plugin-supports-get_symbols_v3)] lto-plugin: add support for feature detection X-Act-Checkin: gcc X-Git-Author: Martin Liska X-Git-Refname: refs/users/marxin/heads/lto-plugin-supports-get_symbols_v3 X-Git-Oldrev: 3ae5cbff1ad958ddefc12010bf7e32a47741d331 X-Git-Newrev: 7b5acd79a749e50bc825a49b283d4f9e82a5e1b5 Message-Id: <20220504124139.661DB3857359@sourceware.org> Date: Wed, 4 May 2022 12:41:39 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2022 12:41:39 -0000 https://gcc.gnu.org/g:7b5acd79a749e50bc825a49b283d4f9e82a5e1b5 commit 7b5acd79a749e50bc825a49b283d4f9e82a5e1b5 Author: Martin Liska Date: Tue Mar 1 12:27:45 2022 +0100 lto-plugin: add support for feature detection lto-plugin/ChangeLog: * lto-plugin.c (supports_get_symbols_v3): Add symbol and initialize it to true; lto-plugin/ChangeLog: * lto-plugin.map: Add supports_get_symbols_v3 symbol. Diff: --- lto-plugin/lto-plugin.c | 5 +++++ lto-plugin/lto-plugin.map | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lto-plugin/lto-plugin.c b/lto-plugin/lto-plugin.c index 47378435612..6aac5867066 100644 --- a/lto-plugin/lto-plugin.c +++ b/lto-plugin/lto-plugin.c @@ -1554,3 +1554,8 @@ onload (struct ld_plugin_tv *tv) return LDPS_OK; } + +/* Presence of the following symbols is used for dynamic detection of plug-in features + from linker side. */ + +bool supports_get_symbols_v3 = true; diff --git a/lto-plugin/lto-plugin.map b/lto-plugin/lto-plugin.map index 3d60e71cc2d..42dc50a819c 100644 --- a/lto-plugin/lto-plugin.map +++ b/lto-plugin/lto-plugin.map @@ -1,3 +1,6 @@ { - global: onload; local: *; + global: onload; + supports_get_symbols_v3; + + local: *; };