aboutsummaryrefslogtreecommitdiff
path: root/binutils/bucomm.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2009-01-29 13:03:21 +0000
committerAlan Modra <amodra@gmail.com>2009-01-29 13:03:21 +0000
commit8d8e0703f44b4fe58cb3e7ded5d337a3c868d3e2 (patch)
tree193080b9cc783ada710b34f34ba4cea406d469d8 /binutils/bucomm.c
parentfdfde340537dfac5eec37e75399069cb76717c0c (diff)
downloadgdb-8d8e0703f44b4fe58cb3e7ded5d337a3c868d3e2.zip
gdb-8d8e0703f44b4fe58cb3e7ded5d337a3c868d3e2.tar.gz
gdb-8d8e0703f44b4fe58cb3e7ded5d337a3c868d3e2.tar.bz2
PR 9798
* bucomm.c (bfd_nonfatal_message): Use bfd_get_archive_filename. (bfd_get_archive_filename): Constify param. * bucomm.h (bfd_get_archive_filename): Update prototype. * objcopy.c (RETURN_NONFATAL): Delete. (copy_unknown_object): Don't call bfd_get_archive_filename for bfd_nonfatal_message filename, instead just pass bfd. (copy_object): Likewise. (copy_archive, copy_file): Likewise. Expand RETURN_NONFATAL. On bfd_close errors, do not pass the bfd to bfd_nonfatal_message. (setup_bfd_headers): Fix error message.
Diffstat (limited to 'binutils/bucomm.c')
-rw-r--r--binutils/bucomm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/binutils/bucomm.c b/binutils/bucomm.c
index 508790f..9bbdafb 100644
--- a/binutils/bucomm.c
+++ b/binutils/bucomm.c
@@ -1,6 +1,6 @@
/* bucomm.c -- Bin Utils COMmon code.
Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001, 2002,
- 2003, 2006, 2007
+ 2003, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -88,7 +88,7 @@ bfd_nonfatal_message (const char *filename,
if (bfd)
{
if (!filename)
- filename = bfd_get_filename (bfd);
+ filename = bfd_get_archive_filename (bfd);
if (section)
section_name = bfd_get_section_name (bfd, section);
}
@@ -577,7 +577,7 @@ get_file_size (const char * file_name)
/* Return the filename in a static buffer. */
const char *
-bfd_get_archive_filename (bfd *abfd)
+bfd_get_archive_filename (const bfd *abfd)
{
static size_t curr = 0;
static char *buf;