summaryrefslogtreecommitdiffstats
path: root/binutils-2.25/bfd/ieee.c
diff options
context:
space:
mode:
Diffstat (limited to 'binutils-2.25/bfd/ieee.c')
-rw-r--r--binutils-2.25/bfd/ieee.c38
1 files changed, 10 insertions, 28 deletions
diff --git a/binutils-2.25/bfd/ieee.c b/binutils-2.25/bfd/ieee.c
index b93fdeb8..313834e7 100644
--- a/binutils-2.25/bfd/ieee.c
+++ b/binutils-2.25/bfd/ieee.c
@@ -1,7 +1,5 @@
/* BFD back-end for ieee-695 objects.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 1990-2014 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
@@ -35,6 +33,7 @@
#include "ieee.h"
#include "libieee.h"
#include "safe-ctype.h"
+#include "libiberty.h"
struct output_buffer_struct
{
@@ -1313,7 +1312,8 @@ ieee_archive_p (bfd *abfd)
/* Ignore the return value here. It doesn't matter if we don't read
the entire buffer. We might have a very small ieee file. */
- bfd_bread ((void *) buffer, (bfd_size_type) sizeof (buffer), abfd);
+ if (bfd_bread ((void *) buffer, (bfd_size_type) sizeof (buffer), abfd) <= 0)
+ goto got_wrong_format_error;
ieee->h.first_byte = buffer;
ieee->h.input_p = buffer;
@@ -1802,7 +1802,8 @@ ieee_object_p (bfd *abfd)
goto fail;
/* Read the first few bytes in to see if it makes sense. Ignore
bfd_bread return value; The file might be very small. */
- bfd_bread ((void *) buffer, (bfd_size_type) sizeof (buffer), abfd);
+ if (bfd_bread ((void *) buffer, (bfd_size_type) sizeof (buffer), abfd) <= 0)
+ goto got_wrong_format;
ieee->h.input_p = buffer;
if (this_byte_and_next (&(ieee->h)) != Module_Beginning)
@@ -1824,7 +1825,7 @@ ieee_object_p (bfd *abfd)
goto got_wrong_format;
ieee->mb.module_name = read_id (&(ieee->h));
if (abfd->filename == (const char *) NULL)
- abfd->filename = ieee->mb.module_name;
+ abfd->filename = xstrdup (ieee->mb.module_name);
/* Determine the architecture and machine type of the object file. */
{
@@ -3676,26 +3677,9 @@ ieee_openr_next_archived_file (bfd *arch, bfd *prev)
}
}
-static bfd_boolean
-ieee_find_nearest_line (bfd *abfd ATTRIBUTE_UNUSED,
- asection *section ATTRIBUTE_UNUSED,
- asymbol **symbols ATTRIBUTE_UNUSED,
- bfd_vma offset ATTRIBUTE_UNUSED,
- const char **filename_ptr ATTRIBUTE_UNUSED,
- const char **functionname_ptr ATTRIBUTE_UNUSED,
- unsigned int *line_ptr ATTRIBUTE_UNUSED)
-{
- return FALSE;
-}
-
-static bfd_boolean
-ieee_find_inliner_info (bfd *abfd ATTRIBUTE_UNUSED,
- const char **filename_ptr ATTRIBUTE_UNUSED,
- const char **functionname_ptr ATTRIBUTE_UNUSED,
- unsigned int *line_ptr ATTRIBUTE_UNUSED)
-{
- return FALSE;
-}
+#define ieee_find_nearest_line _bfd_nosymbols_find_nearest_line
+#define ieee_find_line _bfd_nosymbols_find_line
+#define ieee_find_inliner_info _bfd_nosymbols_find_inliner_info
static int
ieee_generic_stat_arch_elt (bfd *abfd, struct stat *buf)
@@ -3780,7 +3764,6 @@ ieee_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
_bfd_generic_section_already_linked
#define ieee_bfd_define_common_symbol bfd_generic_define_common_symbol
#define ieee_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
-#define ieee_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define ieee_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define ieee_bfd_link_just_syms _bfd_generic_link_just_syms
#define ieee_bfd_copy_link_hash_symbol_type \
@@ -3858,7 +3841,6 @@ const bfd_target ieee_vec =
/* ieee_sizeof_headers, ieee_bfd_get_relocated_section_contents,
ieee_bfd_relax_section, ieee_bfd_link_hash_table_create,
- _bfd_generic_link_hash_table_free,
ieee_bfd_link_add_symbols, ieee_bfd_final_link,
ieee_bfd_link_split_section, ieee_bfd_gc_sections,
ieee_bfd_merge_sections. */