Fix non-ELF build breakage
authorAlan Modra <amodra@gmail.com>
Tue, 12 Aug 2014 22:02:21 +0000 (07:32 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 12 Aug 2014 22:06:30 +0000 (07:36 +0930)
* ldlang.c (open_input_bfds): Don't use bfd_elf_get_dyn_lib_class.

ld/ChangeLog
ld/ldlang.c

index ff161dae2b8f377f08b8204b45fb95261d15ee0e..f62813e93722c4da6555dad68e9d3bad009308ad 100644 (file)
@@ -1,3 +1,7 @@
+2014-08-13  Alan Modra  <amodra@gmail.com>
+
+       * ldlang.c (open_input_bfds): Don't use bfd_elf_get_dyn_lib_class.
+
 2014-08-12  Alan Modra  <amodra@gmail.com>
 
        * ldlang.h (struct lang_input_statement_flags): Don't make "reload"
index 9ca086d30086fbf98e337d34b2e6a71a77e92716..419caa1ea5b1f30d51dfa49a32ae36d4ac04066b 100644 (file)
@@ -40,6 +40,7 @@
 #include "demangle.h"
 #include "hashtab.h"
 #include "libbfd.h"
+#include "elf-bfd.h"
 #ifdef ENABLE_PLUGINS
 #include "plugin.h"
 #endif /* ENABLE_PLUGINS */
@@ -3288,8 +3289,7 @@ open_input_bfds (lang_statement_union_type *s, enum open_bfd_mode mode)
                          && ((abfd->flags) & DYNAMIC) != 0
                          && s->input_statement.flags.add_DT_NEEDED_for_regular
                          && bfd_get_flavour (abfd) == bfd_target_elf_flavour
-                         && (bfd_elf_get_dyn_lib_class (abfd)
-                             & DYN_AS_NEEDED) != 0)))
+                         && (elf_dyn_lib_class (abfd) & DYN_AS_NEEDED) != 0)))
                {
                  s->input_statement.flags.loaded = FALSE;
                  s->input_statement.flags.reload = TRUE;