mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-15 05:01:13 +08:00
* mipsread.c (read_alphacoff_dynamic_symtab): Replace alloca calls
with xmalloc calls and cleanups.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2000-02-10 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
|
||||||
|
|
||||||
|
* mipsread.c (read_alphacoff_dynamic_symtab): Replace alloca calls
|
||||||
|
with xmalloc calls and cleanups.
|
||||||
|
|
||||||
2000-02-10 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
|
2000-02-10 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
|
||||||
|
|
||||||
* rs6000-nat.c (child_xfer_memory): Add missing parameter
|
* rs6000-nat.c (child_xfer_memory): Add missing parameter
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Read a symbol table in MIPS' format (Third-Eye).
|
/* Read a symbol table in MIPS' format (Third-Eye).
|
||||||
Copyright 1986, 87, 89, 90, 91, 92, 93, 94, 95, 96, 1998
|
Copyright 1986, 87, 89, 90, 91, 92, 93, 94, 95, 96, 1998, 2001
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
Contributed by Alessandro Forin (af@cs.cmu.edu) at CMU. Major work
|
Contributed by Alessandro Forin (af@cs.cmu.edu) at CMU. Major work
|
||||||
by Per Bothner, John Gilmore and Ian Lance Taylor at Cygnus Support.
|
by Per Bothner, John Gilmore and Ian Lance Taylor at Cygnus Support.
|
||||||
@ -243,6 +243,7 @@ read_alphacoff_dynamic_symtab (struct section_offsets *section_offsets,
|
|||||||
int got_entry_size = 8;
|
int got_entry_size = 8;
|
||||||
int dt_mips_local_gotno = -1;
|
int dt_mips_local_gotno = -1;
|
||||||
int dt_mips_gotsym = -1;
|
int dt_mips_gotsym = -1;
|
||||||
|
struct cleanup *cleanups;
|
||||||
|
|
||||||
|
|
||||||
/* We currently only know how to handle alpha dynamic symbols. */
|
/* We currently only know how to handle alpha dynamic symbols. */
|
||||||
@ -262,10 +263,14 @@ read_alphacoff_dynamic_symtab (struct section_offsets *section_offsets,
|
|||||||
str_secsize = bfd_get_section_size_before_reloc (si.str_sect);
|
str_secsize = bfd_get_section_size_before_reloc (si.str_sect);
|
||||||
dyninfo_secsize = bfd_get_section_size_before_reloc (si.dyninfo_sect);
|
dyninfo_secsize = bfd_get_section_size_before_reloc (si.dyninfo_sect);
|
||||||
got_secsize = bfd_get_section_size_before_reloc (si.got_sect);
|
got_secsize = bfd_get_section_size_before_reloc (si.got_sect);
|
||||||
sym_secptr = alloca (sym_secsize);
|
sym_secptr = xmalloc (sym_secsize);
|
||||||
str_secptr = alloca (str_secsize);
|
cleanups = make_cleanup (free, sym_secptr);
|
||||||
dyninfo_secptr = alloca (dyninfo_secsize);
|
str_secptr = xmalloc (str_secsize);
|
||||||
got_secptr = alloca (got_secsize);
|
make_cleanup (free, str_secptr);
|
||||||
|
dyninfo_secptr = xmalloc (dyninfo_secsize);
|
||||||
|
make_cleanup (free, dyninfo_secptr);
|
||||||
|
got_secptr = xmalloc (got_secsize);
|
||||||
|
make_cleanup (free, got_secptr);
|
||||||
|
|
||||||
if (!bfd_get_section_contents (abfd, si.sym_sect, sym_secptr,
|
if (!bfd_get_section_contents (abfd, si.sym_sect, sym_secptr,
|
||||||
(file_ptr) 0, sym_secsize))
|
(file_ptr) 0, sym_secsize))
|
||||||
@ -418,6 +423,8 @@ read_alphacoff_dynamic_symtab (struct section_offsets *section_offsets,
|
|||||||
|
|
||||||
prim_record_minimal_symbol (name, sym_value, ms_type, objfile);
|
prim_record_minimal_symbol (name, sym_value, ms_type, objfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
do_cleanups (cleanups);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialization */
|
/* Initialization */
|
||||||
|
Reference in New Issue
Block a user