aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2011-10-16 19:36:10 +0000
committerH.J. Lu <hjl.tools@gmail.com>2011-10-16 19:36:10 +0000
commit746c5e8cf04907404d06ba0919c008f0da633255 (patch)
tree497827d3c9b5a24d4c0b06d7af75c412f1233a63 /binutils
parent20ec36d94265dd0a49c3da36a095a92668c55327 (diff)
downloadfsf-binutils-gdb-746c5e8cf04907404d06ba0919c008f0da633255.zip
fsf-binutils-gdb-746c5e8cf04907404d06ba0919c008f0da633255.tar.gz
fsf-binutils-gdb-746c5e8cf04907404d06ba0919c008f0da633255.tar.bz2
Set target from the the first object only if it isn't set.
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.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/ar.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 4dcc376..b344d01 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+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-10-13 Nick Clifton <nickc@redhat.com>
Fixes to aid translation:
diff --git a/binutils/ar.c b/binutils/ar.c
index 7b3c3fa..882ef1a 100644
--- a/binutils/ar.c
+++ b/binutils/ar.c
@@ -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;