From: Paul Pluzhnikov Date: Thu, 30 Apr 2009 21:59:03 +0000 (+0000) Subject: 2009-04-30 Paul Pluzhnikov X-Git-Tag: sid-snapshot-20090501~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=25c2f6abe046d0ce97853334221bda452101df81;p=external%2Fbinutils.git 2009-04-30 Paul Pluzhnikov * elfread.c (elf_symtab_read): Don't assume .data and .rodata are present. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2d1fdf6..c8e4137 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2009-04-30 Paul Pluzhnikov + + * elfread.c (elf_symtab_read): Don't assume .data and .rodata + are present. + 2009-04-30 Hui Zhu Michael Snyder diff --git a/gdb/elfread.c b/gdb/elfread.c index ff220a2..6e79d4a 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c @@ -427,10 +427,11 @@ elf_symtab_read (struct objfile *objfile, int type, int max_index; size_t size; - max_index - = max (SECT_OFF_BSS (objfile), - max (SECT_OFF_DATA (objfile), - SECT_OFF_RODATA (objfile))); + max_index = SECT_OFF_BSS (objfile); + if (objfile->sect_index_data > max_index) + max_index = objfile->sect_index_data; + if (objfile->sect_index_rodata > max_index) + max_index = objfile->sect_index_rodata; /* max_index is the largest index we'll use into this array, so we must