Do without ld ENABLE_PLUGINS
[deliverable/binutils-gdb.git] / ld / plugin.c
index 4ef4a236650ce97b51ed6bd7edd5369a035f18f6..b455af6d6762321200f37a7103619271b99779b2 100644 (file)
@@ -21,6 +21,7 @@
 #include "sysdep.h"
 #include "libiberty.h"
 #include "bfd.h"
+#if BFD_SUPPORTS_PLUGINS
 #include "bfdlink.h"
 #include "bfdver.h"
 #include "ctf-api.h"
@@ -1191,7 +1192,7 @@ plugin_object_p (bfd *ibfd)
 
   /* We create a dummy BFD, initially empty, to house whatever symbols
      the plugin may want to add.  */
-  abfd = plugin_get_ir_dummy_bfd (ibfd->filename, ibfd);
+  abfd = plugin_get_ir_dummy_bfd (bfd_get_filename (ibfd), ibfd);
 
   input = bfd_alloc (abfd, sizeof (*input));
   if (input == NULL)
@@ -1201,7 +1202,7 @@ plugin_object_p (bfd *ibfd)
   if (!bfd_plugin_open_input (ibfd, &file))
     return NULL;
 
-  if (file.name == ibfd->filename)
+  if (file.name == bfd_get_filename (ibfd))
     {
       /* We must copy filename attached to ibfd if it is not an archive
         member since it may be freed by bfd_close below.  */
@@ -1217,7 +1218,7 @@ plugin_object_p (bfd *ibfd)
   input->use_mmap = FALSE;
   input->offset = file.offset;
   input->filesize = file.filesize;
-  input->name = plugin_strdup (abfd, ibfd->filename);
+  input->name = plugin_strdup (abfd, bfd_get_filename (ibfd));
 
   claimed = 0;
 
@@ -1462,3 +1463,4 @@ plugin_notice (struct bfd_link_info *info,
                                      abfd, section, value, flags);
   return TRUE;
 }
+#endif /* BFD_SUPPORTS_PLUGINS */
This page took 0.024461 seconds and 4 git commands to generate.