diff options
author | David Carlton <carlton@bactrian.org> | 2003-06-27 21:50:37 +0000 |
---|---|---|
committer | David Carlton <carlton@bactrian.org> | 2003-06-27 21:50:37 +0000 |
commit | 3abe3bc90be798445086f45d9c3723165cc6c893 (patch) | |
tree | 20de3690d32dbb68a1e4266dfd13575be97ea40e /gdb/xcoffread.c | |
parent | c8a2fad7b41a8264964233608ae10c35918243fb (diff) | |
download | gdb-3abe3bc90be798445086f45d9c3723165cc6c893.zip gdb-3abe3bc90be798445086f45d9c3723165cc6c893.tar.gz gdb-3abe3bc90be798445086f45d9c3723165cc6c893.tar.bz2 |
2003-06-27 David Carlton <carlton@kealia.com>
* Merge with mainline; tag is carlton_dictionary-20030627-merge.
Diffstat (limited to 'gdb/xcoffread.c')
-rw-r--r-- | gdb/xcoffread.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index 94c9a1c..7008192 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -2980,9 +2980,10 @@ xcoff_symfile_offsets (struct objfile *objfile, struct section_addr_info *addrs) asection *sect = NULL; int i; - objfile->num_sections = SECT_OFF_MAX; + objfile->num_sections = bfd_count_sections (objfile->obfd); objfile->section_offsets = (struct section_offsets *) - obstack_alloc (&objfile->psymbol_obstack, SIZEOF_SECTION_OFFSETS); + obstack_alloc (&objfile->psymbol_obstack, + SIZEOF_N_SECTION_OFFSETS (objfile->num_sections)); /* Initialize the section indexes for future use. */ sect = bfd_get_section_by_name (objfile->obfd, ".text"); |