]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR binutils/13278
authorAlan Modra <amodra@gmail.com>
Tue, 25 Oct 2011 03:08:40 +0000 (03:08 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 25 Oct 2011 03:08:40 +0000 (03:08 +0000)
2011-10-16  H.J. Lu  <hongjiu.lu@intel.com>
* ar.c (open_inarch): Set the target from the the first object
on the list only if it isn't set.

binutils/ChangeLog
binutils/ar.c

index b61c8e2e5764b4e1c4839771867c89d93fe75850..2f5af61ba93c18b8a715c407b94e9a235e8b37ae 100644 (file)
@@ -1,3 +1,11 @@
+2011-10-25  Alan Modra  <amodra@gmail.com>
+
+       Apply mainline patches
+       2011-10-16  H.J. Lu  <hongjiu.lu@intel.com>
+       PR binutils/13278
+       * ar.c (open_inarch): Set the target from the the first object
+       on the list only if it isn't set.
+
 2011-09-22  Tristan Gingold  <gingold@adacore.com>
 
        * NEWS: Add marker for 2.22.
index f8c977abcdcfcbdb917a25ea5b5114102c600180..22be2cd053d4a1de4f078fb5e74ed66fca7697ab 100644 (file)
@@ -815,9 +815,9 @@ open_inarch (const char *archive_filename, const char *file)
          return NULL;
        }
 
-      /* Try to figure out the target to use for the archive from the
-         first object on the list.  */
-      if (file != NULL)
+      /* If the target isn't set, try to figure out the target to use
+        for the archive from the first object on the list.  */
+      if (target == NULL && file != NULL)
        {
          bfd *obj;