From 7b5acd79a749e50bc825a49b283d4f9e82a5e1b5 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 1 Mar 2022 12:27:45 +0100 Subject: [PATCH] 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. --- 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: *; }; -- 2.36.0