aboutsummaryrefslogtreecommitdiff
path: root/bfd/vms-lib.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2014-01-02 12:14:37 +0000
committerNick Clifton <nickc@redhat.com>2014-01-02 12:14:37 +0000
commit1be5090bcaf4bcab333cf03f4157b16d33881222 (patch)
treeceb44d7963da8d56f0a3253a0cba36c4830daead /bfd/vms-lib.c
parente2359dfd4dd0f24cdb30886ed547c27a86813469 (diff)
downloadgdb-1be5090bcaf4bcab333cf03f4157b16d33881222.zip
gdb-1be5090bcaf4bcab333cf03f4157b16d33881222.tar.gz
gdb-1be5090bcaf4bcab333cf03f4157b16d33881222.tar.bz2
PR binutils/11983
* archive.c (_bfd_get_elt_at_filepos): Store a copy of the filename in the bfd's filename field. * elfcode.h (bfd_from_remote_memory): Likewise. * ieee.c (ieee_object_p): Likewise. * mach-o.c (bfd_mach_o_fat_member_init): Likewise. * oasys.c (oasys_openr_next_archived_file): Likewise. * vms-lib.c (_bfd_vms_lib_get_module): Likewise. * opncls.c (bfd_fopen): Likewise. (bfd_openstreamr): Likewise. (bfd_openr_iovec): Likewise. (bfd_openw): Likewise. (bfd_create): Likewise. (_bfd_delete_bfd): Free filename.
Diffstat (limited to 'bfd/vms-lib.c')
-rw-r--r--bfd/vms-lib.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/vms-lib.c b/bfd/vms-lib.c
index b553570..407c186 100644
--- a/bfd/vms-lib.c
+++ b/bfd/vms-lib.c
@@ -1,6 +1,6 @@
/* BFD back-end for VMS archive files.
- Copyright 2010, 2011, 2012 Free Software Foundation, Inc.
+ Copyright 2010-2013 Free Software Foundation, Inc.
Written by Tristan Gingold <gingold@adacore.com>, AdaCore.
This file is part of BFD, the Binary File Descriptor library.
@@ -25,6 +25,7 @@
#include "libbfd.h"
#include "safe-ctype.h"
#include "bfdver.h"
+#include "libiberty.h"
#include "vms.h"
#include "vms/lbr.h"
#include "vms/dcx.h"
@@ -1376,7 +1377,7 @@ _bfd_vms_lib_get_module (bfd *abfd, unsigned int modidx)
default:
break;
}
- res->filename = name;
+ res->filename = xstrdup (name);
tdata->cache[modidx] = res;