GNU Binutils with patches for OS216
Revision | bda22572abf4a7aac66c07bdb7549ee8c03b58f5 (tree) |
---|---|
Time | 2003-12-27 22:52:51 |
Author | Mark Kettenis <kettenis@gnu....> |
Commiter | Mark Kettenis |
Merge from mainline:
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.)
@@ -1,5 +1,14 @@ | ||
1 | 1 | 2003-12-27 Mark Kettenis <kettenis@gnu.org> |
2 | 2 | |
3 | + Merge from mainline: | |
4 | + | |
5 | + 2003-10-31 Jim Blandy <jimb@redhat.com> | |
6 | + | |
7 | + * elfread.c (elf_symtab_read): Allocate correct number of tail | |
8 | + elements to sectinfo structure. (Fix from Woody LaRue.) | |
9 | + | |
10 | +2003-12-27 Mark Kettenis <kettenis@gnu.org> | |
11 | + | |
3 | 12 | * config/sparc/nbsd64.mh (NATDEPFILES): Add sparc64-nat.o. |
4 | 13 | |
5 | 14 | * Makefile.in (sparc64fbsd-tdep.o): Update dependencies. |
@@ -398,9 +398,17 @@ elf_symtab_read (struct objfile *objfile, int dynamic) | ||
398 | 398 | = max (SECT_OFF_BSS (objfile), |
399 | 399 | max (SECT_OFF_DATA (objfile), |
400 | 400 | SECT_OFF_RODATA (objfile))); |
401 | + | |
402 | + /* max_index is the largest index we'll | |
403 | + use into this array, so we must | |
404 | + allocate max_index+1 elements for it. | |
405 | + However, 'struct stab_section_info' | |
406 | + already includes one element, so we | |
407 | + need to allocate max_index aadditional | |
408 | + elements. */ | |
401 | 409 | size = (sizeof (struct stab_section_info) |
402 | 410 | + (sizeof (CORE_ADDR) |
403 | - * (max_index - 1))); | |
411 | + * max_index)); | |
404 | 412 | sectinfo = (struct stab_section_info *) |
405 | 413 | xmmalloc (objfile->md, size); |
406 | 414 | memset (sectinfo, 0, size); |