From: H.J. Lu Date: Mon, 4 Apr 2011 01:35:59 +0000 (+0000) Subject: Make the unknown archive element readable. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1e99536ae5e3e54a10f35e8c915d3bd6c44140bd;p=binutils-gdb.git Make the unknown archive element readable. 2011-04-03 H.J. Lu PR binutils/12632 * objcopy.c (copy_unknown_object): Make the archive element readable. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index ade1cda8f3a..ee7188aaaa9 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2011-04-03 H.J. Lu + + PR binutils/12632 + * objcopy.c (copy_unknown_object): Make the archive element + readable. + 2011-04-03 David S. Miller * objdump.c (dump_reloc_set): Output R_SPARC_OLO10 relocations diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 77eaa348b18..15c4f9579a8 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; }