#include "safe-ctype.h"
#include "libiberty.h"
#include "objalloc.h"
-#ifdef BFD_SUPPORTS_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
#include "plugin.h"
#endif
object file is an IR object, give linker LTO plugin a chance to
get the correct symbol table. */
if (abfd->plugin_format == bfd_plugin_yes
-#ifdef BFD_SUPPORTS_PLUGINS
+#if BFD_SUPPORTS_PLUGINS
|| (abfd->plugin_format == bfd_plugin_unknown
&& bfd_link_plugin_object_p (abfd))
#endif
case bfd_link_hash_undefined:
case bfd_link_hash_undefweak:
abfd = h->root.u.undef.abfd;
- if ((abfd->flags & DYNAMIC) == 0
+ if (abfd == NULL
+ || (abfd->flags & DYNAMIC) == 0
|| (elf_dyn_lib_class (abfd) & DYN_DT_NEEDED) == 0)
return FALSE;
break;