diff options
author | Paul Pluzhnikov <ppluzhnikov@google.com> | 2009-04-30 21:59:01 +0000 |
---|---|---|
committer | Paul Pluzhnikov <ppluzhnikov@google.com> | 2009-04-30 21:59:01 +0000 |
commit | a52c6b99eb1d48a0e6ffc6e56970aee55fb45551 (patch) | |
tree | 0f31d3492bff180929390b68877c67f1cbbecb90 /gdb/elfread.c | |
parent | b192f5319e20e3cd5e18a3d92402b412e4053af0 (diff) | |
download | gdb-a52c6b99eb1d48a0e6ffc6e56970aee55fb45551.tar.gz |
2009-04-30 Paul Pluzhnikov <ppluzhnikov@google.com>
* elfread.c (elf_symtab_read): Don't assume .data and .rodata
are present.
Diffstat (limited to 'gdb/elfread.c')
-rw-r--r-- | gdb/elfread.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gdb/elfread.c b/gdb/elfread.c index ff220a25b6a..6e79d4abbd0 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 |