Fix build breakage when ld plugins disabled
authorAlan Modra <amodra@gmail.com>
Tue, 12 Aug 2014 09:59:33 +0000 (19:29 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 12 Aug 2014 11:19:58 +0000 (20:49 +0930)
* ldlang.h (struct lang_input_statement_flags): Don't make "reload"
field conditional on ENABLE_PLUGINS.
* ldlang.c (open_input_bfds): Expand plugin_should_reload.
* plugin.h (plugin_should_reload): Delete.
* plugin.c (plugin_should_reload): Delete.

ld/ChangeLog
ld/ldlang.c
ld/ldlang.h
ld/plugin.c
ld/plugin.h

index ade3a40725278b81abbbc641a40587cfbaa8eaf5..ff161dae2b8f377f08b8204b45fb95261d15ee0e 100644 (file)
@@ -1,3 +1,11 @@
+2014-08-12  Alan Modra  <amodra@gmail.com>
+
+       * ldlang.h (struct lang_input_statement_flags): Don't make "reload"
+       field conditional on ENABLE_PLUGINS.
+       * ldlang.c (open_input_bfds): Expand plugin_should_reload.
+       * plugin.h (plugin_should_reload): Delete.
+       * plugin.c (plugin_should_reload): Delete.
+
 2014-08-12  Alan Modra  <amodra@gmail.com>
 
        * ldmain.c (notice): Update args.
index 5e10c4abdb833f7f78699253d4b69189e644b53a..9ca086d30086fbf98e337d34b2e6a71a77e92716 100644 (file)
@@ -3287,7 +3287,9 @@ open_input_bfds (lang_statement_union_type *s, enum open_bfd_mode mode)
                      || (bfd_get_format (abfd) == bfd_object
                          && ((abfd->flags) & DYNAMIC) != 0
                          && s->input_statement.flags.add_DT_NEEDED_for_regular
-                         && plugin_should_reload (abfd))))
+                         && bfd_get_flavour (abfd) == bfd_target_elf_flavour
+                         && (bfd_elf_get_dyn_lib_class (abfd)
+                             & DYN_AS_NEEDED) != 0)))
                {
                  s->input_statement.flags.loaded = FALSE;
                  s->input_statement.flags.reload = TRUE;
index 45420cd1e07e98af01eaf14e6734e0c7687d067e..2afe283e794fd80a28170db6157b6cc39c06b411 100644 (file)
@@ -272,15 +272,15 @@ struct lang_input_statement_flags
   /* Set if the file does not exist.  */
   unsigned int missing_file : 1;
 
+  /* Set if reloading an archive or --as-needed lib.  */
+  unsigned int reload : 1;
+
 #ifdef ENABLE_PLUGINS
   /* Set if the file was claimed by a plugin.  */
   unsigned int claimed : 1;
 
   /* Set if the file was claimed from an archive.  */
   unsigned int claim_archive : 1;
-
-  /* Set if reloading an archive or --as-needed lib.  */
-  unsigned int reload : 1;
 #endif /* ENABLE_PLUGINS */
 
   /* Head of list of pushed flags.  */
index 8cca7d02c6eeff0b203445993b0233aae7b60bd8..652cde15732501ce078786c8758e2616cf053dc5 100644 (file)
@@ -1045,12 +1045,3 @@ plugin_notice (struct bfd_link_info *info,
                                      abfd, section, value, flags);
   return TRUE;
 }
-
-/* Return true if ABFD, a dynamic library, should be reloaded.  */
-
-bfd_boolean
-plugin_should_reload (bfd *abfd)
-{
-  return (bfd_get_flavour (abfd) == bfd_target_elf_flavour
-         && (elf_dyn_lib_class (abfd) & DYN_AS_NEEDED) != 0);
-}
index 1e239cadec54c364e4a03bdc2b1b314ffc3bc04b..bccbee3ba92c8aefb0001b8daadce26a43f527a3 100644 (file)
@@ -66,7 +66,4 @@ extern void plugin_call_cleanup (void);
    add_symbols hook has been called so that it can be read when linking.  */
 extern bfd *plugin_get_ir_dummy_bfd (const char *name, bfd *template);
 
-/* Return true if ABFD, a dynamic library, should be reloaded.  */
-extern bfd_boolean plugin_should_reload (bfd *);
-
 #endif /* !def GLD_PLUGIN_H */
This page took 0.040424 seconds and 4 git commands to generate.