aboutsummaryrefslogtreecommitdiff
path: root/ld/plugin.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2024-06-26 13:17:25 +0100
committerNick Clifton <nickc@redhat.com>2024-06-26 13:17:25 +0100
commit057a2b4c4b57ef495dd32c9087e4af28bda41737 (patch)
tree786c186658cf26b13839680cc6d36b1b6d6ffc07 /ld/plugin.c
parentcbccccfdf19a388abb10579aea42c8b35c25c933 (diff)
downloadgdb-057a2b4c4b57ef495dd32c9087e4af28bda41737.zip
gdb-057a2b4c4b57ef495dd32c9087e4af28bda41737.tar.gz
gdb-057a2b4c4b57ef495dd32c9087e4af28bda41737.tar.bz2
Revert: 35fd2ddeb1d90f1750401cfb6d01fe055656b88d
PR 20814
Diffstat (limited to 'ld/plugin.c')
-rw-r--r--ld/plugin.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/ld/plugin.c b/ld/plugin.c
index 13d29d6..8107841 100644
--- a/ld/plugin.c
+++ b/ld/plugin.c
@@ -928,7 +928,7 @@ add_input_file (const char *pathname)
NULL);
if (!is)
return LDPS_ERR;
- is->flags.lto_output = 1;
+ is->plugin = called_plugin;
return LDPS_OK;
}
@@ -943,17 +943,23 @@ add_input_library (const char *pathname)
NULL);
if (!is)
return LDPS_ERR;
- is->flags.lto_output = 1;
+ is->plugin = called_plugin;
return LDPS_OK;
}
/* Set the extra library path to be used by libraries added via
add_input_library. */
+
static enum ld_plugin_status
set_extra_library_path (const char *path)
{
+ search_dirs_type * sdt;
+
ASSERT (called_plugin);
- ldfile_add_library_path (xstrdup (path), false);
+ sdt = ldfile_add_library_path (xstrdup (path), search_dir_plugin);
+ if (sdt == NULL)
+ return LDPS_ERR;
+ sdt->plugin = called_plugin;
return LDPS_OK;
}