diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2011-10-16 19:36:10 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2011-10-16 19:36:10 +0000 |
commit | 495318d49458132f96621abef4868225f721ed48 (patch) | |
tree | 3040edb7499ba3a0a44bb57b4c0380d61a7dcab4 /binutils/ar.c | |
parent | 2df2b90b9972d71a6db546d41fc4d69b99d51422 (diff) | |
download | binutils-redhat-495318d49458132f96621abef4868225f721ed48.tar.gz |
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/ar.c')
-rw-r--r-- | binutils/ar.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/binutils/ar.c b/binutils/ar.c index 7b3c3fa022..882ef1ac0d 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; |