aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfcode.h
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/elfcode.h
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/elfcode.h')
-rw-r--r--bfd/elfcode.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index e296c5c..0328748 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -1,7 +1,5 @@
/* ELF executable support for BFD.
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
- Free Software Foundation, Inc.
+ Copyright 1991-2013 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
in "UNIX System V Release 4, Programmers Guide: ANSI C and
@@ -73,6 +71,7 @@
#include "bfdlink.h"
#include "libbfd.h"
#include "elf-bfd.h"
+#include "libiberty.h"
/* Renaming structures, typedefs, macros and functions to be size-specific. */
#define Elf_External_Ehdr NAME(Elf,External_Ehdr)
@@ -1804,7 +1803,7 @@ NAME(_bfd_elf,bfd_from_remote_memory)
bfd_set_error (bfd_error_no_memory);
return NULL;
}
- nbfd->filename = "<in-memory>";
+ nbfd->filename = xstrdup ("<in-memory>");
nbfd->xvec = templ->xvec;
bim->size = contents_size;
bim->buffer = contents;