Update year range in copyright notice of all files.
[deliverable/binutils-gdb.git] / bfd / xsym.c
index 58b23198e080cbb955e390cdefdd2ea01f3d4acf..6a4a7509d88fbef6e33999cacbfad8cfd849250f 100644 (file)
@@ -1,5 +1,5 @@
 /* xSYM symbol-file support for BFD.
-   Copyright (C) 1999-2014 Free Software Foundation, Inc.
+   Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -33,7 +33,9 @@
 #define bfd_sym_bfd_is_target_special_symbol       ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
 #define bfd_sym_get_lineno                          _bfd_nosymbols_get_lineno
 #define bfd_sym_find_nearest_line                   _bfd_nosymbols_find_nearest_line
+#define bfd_sym_find_line                           _bfd_nosymbols_find_line
 #define bfd_sym_find_inliner_info                   _bfd_nosymbols_find_inliner_info
+#define bfd_sym_get_symbol_version_string          _bfd_nosymbols_get_symbol_version_string
 #define bfd_sym_bfd_make_debug_symbol               _bfd_nosymbols_bfd_make_debug_symbol
 #define bfd_sym_read_minisymbols                    _bfd_generic_read_minisymbols
 #define bfd_sym_minisymbol_to_symbol                _bfd_generic_minisymbol_to_symbol
@@ -57,6 +59,7 @@
 #define bfd_sym_bfd_final_link                      _bfd_generic_final_link
 #define bfd_sym_bfd_link_split_section              _bfd_generic_link_split_section
 #define bfd_sym_get_section_contents_in_window      _bfd_generic_get_section_contents_in_window
+#define bfd_sym_bfd_link_check_relocs               _bfd_generic_link_check_relocs
 
 extern const bfd_target sym_vec;
 
@@ -1802,7 +1805,7 @@ bfd_sym_print_type_information_table_entry (bfd *abfd,
 
   fprintf (f, "\n            ");
 
-  buf = alloca (entry->physical_size);
+  buf = malloc (entry->physical_size);
   if (buf == NULL)
     {
       fprintf (f, "[ERROR]\n");
@@ -1811,11 +1814,13 @@ bfd_sym_print_type_information_table_entry (bfd *abfd,
   if (bfd_seek (abfd, entry->offset, SEEK_SET) < 0)
     {
       fprintf (f, "[ERROR]\n");
+      free (buf);
       return;
     }
   if (bfd_bread (buf, entry->physical_size, abfd) != entry->physical_size)
     {
       fprintf (f, "[ERROR]\n");
+      free (buf);
       return;
     }
 
@@ -1835,6 +1840,7 @@ bfd_sym_print_type_information_table_entry (bfd *abfd,
 
   if (offset != entry->physical_size)
     fprintf (f, "\n            [parser used %lu bytes instead of %lu]", offset, entry->physical_size);
+  free (buf);
 }
 
 void
This page took 0.02544 seconds and 4 git commands to generate.