mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-06 15:38:45 +08:00
* elfread.c (elf_symtab_read): Allocate correct number of tail
elements to sectinfo structure. (Fix from Woody LaRue.)
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2003-10-31 Jim Blandy <jimb@redhat.com>
|
||||||
|
|
||||||
|
* elfread.c (elf_symtab_read): Allocate correct number of tail
|
||||||
|
elements to sectinfo structure. (Fix from Woody LaRue.)
|
||||||
|
|
||||||
2003-10-31 Andrew Cagney <cagney@redhat.com>
|
2003-10-31 Andrew Cagney <cagney@redhat.com>
|
||||||
|
|
||||||
* stack.c (return_command): Use get_frame_type, instead of
|
* stack.c (return_command): Use get_frame_type, instead of
|
||||||
|
@ -398,9 +398,17 @@ elf_symtab_read (struct objfile *objfile, int dynamic)
|
|||||||
= max (SECT_OFF_BSS (objfile),
|
= max (SECT_OFF_BSS (objfile),
|
||||||
max (SECT_OFF_DATA (objfile),
|
max (SECT_OFF_DATA (objfile),
|
||||||
SECT_OFF_RODATA (objfile)));
|
SECT_OFF_RODATA (objfile)));
|
||||||
|
|
||||||
|
/* max_index is the largest index we'll
|
||||||
|
use into this array, so we must
|
||||||
|
allocate max_index+1 elements for it.
|
||||||
|
However, 'struct stab_section_info'
|
||||||
|
already includes one element, so we
|
||||||
|
need to allocate max_index aadditional
|
||||||
|
elements. */
|
||||||
size = (sizeof (struct stab_section_info)
|
size = (sizeof (struct stab_section_info)
|
||||||
+ (sizeof (CORE_ADDR)
|
+ (sizeof (CORE_ADDR)
|
||||||
* (max_index - 1)));
|
* max_index));
|
||||||
sectinfo = (struct stab_section_info *)
|
sectinfo = (struct stab_section_info *)
|
||||||
xmmalloc (objfile->md, size);
|
xmmalloc (objfile->md, size);
|
||||||
memset (sectinfo, 0, size);
|
memset (sectinfo, 0, size);
|
||||||
|
Reference in New Issue
Block a user