X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Fxsym.c;h=3160c1082aec5efe8cdb9a7b870b9fb7ea73714e;hb=0caf6c82ab23ece570d14499ed02653968cd8abd;hp=870795ea2ba17aaff2ae30e7ca0dfc89ea5faa54;hpb=60bb06bc89858ee50ad02907a833565dcc317182;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/xsym.c b/bfd/xsym.c index 870795ea2b..3160c1082a 100644 --- a/bfd/xsym.c +++ b/bfd/xsym.c @@ -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. @@ -51,6 +51,7 @@ #define bfd_sym_bfd_discard_group bfd_generic_discard_group #define bfd_sym_section_already_linked _bfd_generic_section_already_linked #define bfd_sym_bfd_define_common_symbol bfd_generic_define_common_symbol +#define bfd_sym_bfd_define_start_stop bfd_generic_define_start_stop #define bfd_sym_bfd_link_hash_table_create _bfd_generic_link_hash_table_create #define bfd_sym_bfd_link_add_symbols _bfd_generic_link_add_symbols #define bfd_sym_bfd_link_just_syms _bfd_generic_link_just_syms @@ -59,6 +60,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; @@ -1804,7 +1806,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"); @@ -1813,11 +1815,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; } @@ -1837,6 +1841,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