aboutsummaryrefslogtreecommitdiff
path: root/binutils/objcopy.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-06-10 19:43:49 +0000
committerIan Lance Taylor <ian@airs.com>1994-06-10 19:43:49 +0000
commit90f6517da9d3ddf09648bd3bc3fca3cf13da9e5a (patch)
tree217ece3b21504531738d07d9a3e971b38b090c6b /binutils/objcopy.c
parent4f019d0445c7b355b7c097382ab874db7c64735c (diff)
downloadgdb-90f6517da9d3ddf09648bd3bc3fca3cf13da9e5a.zip
gdb-90f6517da9d3ddf09648bd3bc3fca3cf13da9e5a.tar.gz
gdb-90f6517da9d3ddf09648bd3bc3fca3cf13da9e5a.tar.bz2
* objcopy.c (copy_archive): Make the temporary directory in the
same directory as the output BFD, since we may not have write permission on the current directory. Set the permissions of the new directory to 0700, not 0777.
Diffstat (limited to 'binutils/objcopy.c')
-rw-r--r--binutils/objcopy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 2700207..673511f 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -358,10 +358,10 @@ copy_archive (ibfd, obfd, output_target)
{
bfd **ptr = &obfd->archive_head;
bfd *this_element;
- char *dir = cat ("./#", make_tempname (""), "cd");
+ char *dir = make_tempname (bfd_get_filename (obfd));
/* Make a temp directory to hold the contents. */
- mkdir (dir, 0777);
+ mkdir (dir, 0700);
obfd->has_armap = ibfd->has_armap;
this_element = bfd_openr_next_archived_file (ibfd, NULL);