diff options
-rw-r--r-- | ld/ChangeLog | 8 | ||||
-rw-r--r-- | ld/ldlang.c | 4 | ||||
-rw-r--r-- | ld/ldlang.h | 6 | ||||
-rw-r--r-- | ld/plugin.c | 9 | ||||
-rw-r--r-- | ld/plugin.h | 3 |
5 files changed, 14 insertions, 16 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index ade3a40..ff161da 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,13 @@ 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. * plugin.c (plugin_notice): Likewise. Follow warning sym link. Handle new indirect symbol. diff --git a/ld/ldlang.c b/ld/ldlang.c index 5e10c4a..9ca086d 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -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; diff --git a/ld/ldlang.h b/ld/ldlang.h index 45420cd..2afe283 100644 --- a/ld/ldlang.h +++ b/ld/ldlang.h @@ -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. */ diff --git a/ld/plugin.c b/ld/plugin.c index 8cca7d0..652cde1 100644 --- a/ld/plugin.c +++ b/ld/plugin.c @@ -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); -} diff --git a/ld/plugin.h b/ld/plugin.h index 1e239ca..bccbee3 100644 --- a/ld/plugin.h +++ b/ld/plugin.h @@ -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 */ |