When disabling target async, remove all target event sources from the event loop
[deliverable/binutils-gdb.git] / ld / plugin.c
index f6f85ba4cd249355dd494c27eab3a6d59a9c52b8..cfbca0b102fa226631d0f166fbb4bef23c806fd3 100644 (file)
@@ -114,6 +114,7 @@ static const enum ld_plugin_tag tv_header_tags[] =
   LDPT_REGISTER_CLEANUP_HOOK,
   LDPT_ADD_SYMBOLS,
   LDPT_GET_INPUT_FILE,
+  LDPT_GET_VIEW,
   LDPT_RELEASE_INPUT_FILE,
   LDPT_GET_SYMBOLS,
   LDPT_GET_SYMBOLS_V2,
@@ -240,8 +241,12 @@ plugin_opt_plugin_arg (const char *arg)
   return 0;
 }
 
-/* Create a dummy BFD.  */
-bfd *
+/* Generate a dummy BFD to represent an IR file, for any callers of
+   plugin_call_claim_file to use as the handle in the ld_plugin_input_file
+   struct that they build to pass in.  The BFD is initially writable, so
+   that symbols can be added to it; it must be made readable after the
+   add_symbols hook has been called so that it can be read when linking.  */
+static bfd *
 plugin_get_ir_dummy_bfd (const char *name, bfd *srctemplate)
 {
   bfd *abfd;
@@ -443,6 +448,15 @@ get_input_file (const void *handle ATTRIBUTE_UNUSED,
   return LDPS_ERR;
 }
 
+/* Get view of the input file.  */
+static enum ld_plugin_status
+get_view (const void *handle ATTRIBUTE_UNUSED,
+         const void **viewp ATTRIBUTE_UNUSED)
+{
+  ASSERT (called_plugin);
+  return LDPS_ERR;
+}
+
 /* Release the input file.  */
 static enum ld_plugin_status
 release_input_file (const void *handle ATTRIBUTE_UNUSED)
@@ -731,6 +745,9 @@ set_tv_header (struct ld_plugin_tv *tv)
        case LDPT_GET_INPUT_FILE:
          TVU(get_input_file) = get_input_file;
          break;
+       case LDPT_GET_VIEW:
+         TVU(get_view) = get_view;
+         break;
        case LDPT_RELEASE_INPUT_FILE:
          TVU(release_input_file) = release_input_file;
          break;
@@ -774,14 +791,6 @@ set_tv_plugin_args (plugin_t *plugin, struct ld_plugin_tv *tv)
   tv->tv_u.tv_val = 0;
 }
 
-/* Return true if any plugins are active this run.  Only valid
-   after options have been processed.  */
-bfd_boolean
-plugin_active_plugins_p (void)
-{
-  return plugins_list != NULL;
-}
-
 /* Load up and initialise all plugins after argument parsing.  */
 void
 plugin_load_plugins (void)
This page took 0.026781 seconds and 4 git commands to generate.