[binutils-gdb] Fix a problem running the archiver program in MRI mode on archives containing LTO compiled objects.

Nick Clifton nickc@sourceware.org
Mon Apr 19 16:39:54 GMT 2021


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=229597a129f62d5e8a101f1eed95489e2399f741

commit 229597a129f62d5e8a101f1eed95489e2399f741
Author: Nick Clifton <nickc@redhat.com>
Date:   Mon Apr 19 17:38:39 2021 +0100

    Fix a problem running the archiver program in MRI mode on archives containing LTO compiled objects.
    
            PR 21702
            * arsup.c (ar_addmod): Enable plugin support, if available.

Diff:
---
 binutils/ChangeLog | 5 +++++
 binutils/arsup.c   | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index b0b7115feb8..c7914e48fd3 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2021-04-19  Nick Clifton  <nickc@redhat.com>
+
+	PR 21702
+	* arsup.c (ar_addmod): Enable plugin support, if available.
+
 2021-04-19  Nick Clifton  <nickc@redhat.com>
 
 	* rename.c: (get_stat_atime_ns): Add prototype.
diff --git a/binutils/arsup.c b/binutils/arsup.c
index 5cf34e2c112..1d4d1ac70b0 100644
--- a/binutils/arsup.c
+++ b/binutils/arsup.c
@@ -180,7 +180,11 @@ ar_open (char *name, int t)
 	  bfd *element;
 	  bfd *ibfd;
 
+#if BFD_SUPPORTS_PLUGINS	  
+	  ibfd = bfd_openr (name, "plugin");
+#else
 	  ibfd = bfd_openr (name, NULL);
+#endif
 
 	  if (!ibfd)
 	    {


More information about the Binutils-cvs mailing list