This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Add support for creating archives of slim-LTO modules using MRi script commands.


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

commit 70b0cf90bc6c071895b989666bcf3e6eca7b99ce
Author: Nick Clifton <nickc@redhat.com>
Date:   Wed Aug 2 12:12:37 2017 +0100

    Add support for creating archives of slim-LTO modules using MRi script commands.
    
    	PR 21702
    	* arsup.c (ar_addmod): Add plugin support for the MRI ADDMOD
    	command.

Diff:
---
 binutils/ChangeLog |  6 ++++++
 binutils/arsup.c   | 13 +++++++++----
 2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 5c1aa0a..c941aee 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,5 +1,11 @@
 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.
 
 2017-08-02  Alan Modra  <amodra@gmail.com>
diff --git a/binutils/arsup.c b/binutils/arsup.c
index 7088994..acd0939 100644
--- a/binutils/arsup.c
+++ b/binutils/arsup.c
@@ -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);
 	    }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]