aboutsummaryrefslogtreecommitdiff
path: root/bfd/oasys.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/oasys.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/oasys.c')
-rw-r--r--bfd/oasys.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/bfd/oasys.c b/bfd/oasys.c
index ebb12e8..b8e457e 100644
--- a/bfd/oasys.c
+++ b/bfd/oasys.c
@@ -1,7 +1,5 @@
/* BFD back-end for oasys objects.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2001,
- 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011
- Free Software Foundation, Inc.
+ Copyright 1990-2013 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support, <sac@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -28,6 +26,7 @@
#include "libbfd.h"
#include "oasys.h"
#include "liboasys.h"
+#include "libiberty.h"
/* Read in all the section data and relocation stuff too. */
@@ -1118,7 +1117,7 @@ oasys_openr_next_archived_file (bfd *arch, bfd *prev)
{
p->abfd = _bfd_create_empty_archive_element_shell (arch);
p->abfd->origin = p->pos;
- p->abfd->filename = p->name;
+ p->abfd->filename = xstrdup (p->name);
/* Fixup a pointer to this element for the member. */
p->abfd->arelt_data = (void *) p;