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.
This commit is contained in:
H.J. Lu 2011-04-04 01:35:59 +00:00
parent bf03e63286
commit 1e99536ae5
2 changed files with 9 additions and 1 deletions

View File

@ -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

View File

@ -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;
}