Add support for creating archives of slim-LTO modules using MRi script commands.
authorNick Clifton <nickc@redhat.com>
Wed, 2 Aug 2017 11:12:37 +0000 (12:12 +0100)
committerNick Clifton <nickc@redhat.com>
Wed, 2 Aug 2017 11:12:37 +0000 (12:12 +0100)
PR 21702
* arsup.c (ar_addmod): Add plugin support for the MRI ADDMOD
command.

binutils/ChangeLog
binutils/arsup.c

index 5c1aa0a107c0d4f1144fafd2f26218fad9cbc9d4..c941aeeff1d1469b13cd2f21041daa8f6e6e0a4b 100644 (file)
@@ -1,3 +1,9 @@
+2017-08-02  Nick Clifton  <nickc@redhat.com>
+
+       PR 21702
+       * arsup.c (ar_addmod): Add plugin support for the MRI ADDMOD
+       command.
+
 2017-08-02  Nick Clifton  <nickc@redhat.com>
 
        * testsuite/binutils-all/objdump.exp (cpus_expected): Add am33-2.
index 7088994c208f106efa11339410159a57a4b2af6a..acd093908aafd6351115593433a19ed8c20b16f7 100644 (file)
@@ -254,8 +254,13 @@ ar_addmod (struct list *list)
     {
       while (list)
        {
-         bfd *abfd = bfd_openr (list->name, NULL);
+         bfd *abfd;
 
+#if BFD_SUPPORTS_PLUGINS         
+         abfd = bfd_openr (list->name, "plugin");
+#else
+         abfd = bfd_openr (list->name, NULL);
+#endif
          if (!abfd)
            {
              fprintf (stderr, _("%s: can't open file %s\n"),
@@ -367,7 +372,7 @@ ar_replace (struct list *list)
              if (FILENAME_CMP (member->filename, list->name) == 0)
                {
                  /* Found the one to replace.  */
-                 bfd *abfd = bfd_openr (list->name, 0);
+                 bfd *abfd = bfd_openr (list->name, NULL);
 
                  if (!abfd)
                    {
@@ -391,7 +396,7 @@ ar_replace (struct list *list)
 
          if (!found)
            {
-             bfd *abfd = bfd_openr (list->name, 0);
+             bfd *abfd = bfd_openr (list->name, NULL);
 
              fprintf (stderr,_("%s: can't find module file %s\n"),
                       program_name, list->name);
@@ -473,7 +478,7 @@ ar_extract (struct list *list)
 
          if (!found)
            {
-             bfd_openr (list->name, 0);
+             bfd_openr (list->name, NULL);
              fprintf (stderr, _("%s: can't find module file %s\n"),
                       program_name, list->name);
            }