diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2011-04-04 01:35:59 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2011-04-04 01:35:59 +0000 |
commit | 1e99536ae5e3e54a10f35e8c915d3bd6c44140bd (patch) | |
tree | c4f600297567a5c3d5b9ef1b6d7c333562b4b771 /binutils | |
parent | bf03e63286761fab84f2f80f5be7f0be40df112d (diff) | |
download | gdb-1e99536ae5e3e54a10f35e8c915d3bd6c44140bd.zip gdb-1e99536ae5e3e54a10f35e8c915d3bd6c44140bd.tar.gz gdb-1e99536ae5e3e54a10f35e8c915d3bd6c44140bd.tar.bz2 |
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')
-rw-r--r-- | binutils/ChangeLog | 6 | ||||
-rw-r--r-- | binutils/objcopy.c | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index ade1cda..ee7188a 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2011-04-03 H.J. Lu <hongjiu.lu@intel.com> + + PR binutils/12632 + * objcopy.c (copy_unknown_object): Make the archive element + readable. + 2011-04-03 David S. Miller <davem@davemloft.net> * objdump.c (dump_reloc_set): Output R_SPARC_OLO10 relocations diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 77eaa34..15c4f95 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; } |