diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2011-04-04 01:35:58 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2011-04-04 01:35:58 +0000 |
commit | 4343fe025606f408702861ae40660a5d9eef6133 (patch) | |
tree | c6c922f2c4e183df239d17d5b61d5abc80e16fee /binutils/objcopy.c | |
parent | 9c292e75ce0b0e6014ba2d3ce044e649d250330e (diff) | |
download | binutils-redhat-4343fe025606f408702861ae40660a5d9eef6133.tar.gz |
Make the unknown archive element readable.
2011-04-03 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/12632
* objcopy.c (copy_unknown_object): Make the archive element
readable.
Diffstat (limited to 'binutils/objcopy.c')
-rw-r--r-- | binutils/objcopy.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 77eaa348b1..15c4f9579a 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -1399,7 +1399,9 @@ copy_unknown_object (bfd *ibfd, bfd *obfd) ncopied += tocopy; } - chmod (bfd_get_filename (obfd), buf.st_mode); + /* We should at least to be able to read it back when copying an + unknown object in an archive. */ + chmod (bfd_get_filename (obfd), buf.st_mode | S_IRUSR); free (cbuf); return TRUE; } |