1 diff --git a/binutils/objcopy.c b/binutils/objcopy.c
2 index 9732b86..dec0feb 100644
3 --- a/binutils/objcopy.c
4 +++ b/binutils/objcopy.c
5 @@ -2287,6 +2287,18 @@ copy_file (const char *input_filename, const char *output_filename,
12 + struct stat statbuf;
14 + /* No need to check the return value of stat(). It has already
15 + been checked in get_file_size(). */
16 + stat (input_filename, &statbuf);
18 + /* Try to preserve the permission bits. */
19 + chmod (output_filename, statbuf.st_mode);
23 /* Add a name to the section renaming list. */