diff options
author | Paul Pluzhnikov <ppluzhnikov@google.com> | 2009-04-30 21:59:03 +0000 |
---|---|---|
committer | Paul Pluzhnikov <ppluzhnikov@google.com> | 2009-04-30 21:59:03 +0000 |
commit | 25c2f6abe046d0ce97853334221bda452101df81 (patch) | |
tree | 05e9c260392085b164c53611a9fabcc8fbb4e9a8 /gdb/elfread.c | |
parent | 3526b6802eb19481fc9143f53246640e77e3198a (diff) | |
download | gdb-25c2f6abe046d0ce97853334221bda452101df81.zip gdb-25c2f6abe046d0ce97853334221bda452101df81.tar.gz gdb-25c2f6abe046d0ce97853334221bda452101df81.tar.bz2 |
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 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 |