From 3abe3bc90be798445086f45d9c3723165cc6c893 Mon Sep 17 00:00:00 2001 From: David Carlton Date: Fri, 27 Jun 2003 21:50:37 +0000 Subject: 2003-06-27 David Carlton * Merge with mainline; tag is carlton_dictionary-20030627-merge. --- gdb/xcoffread.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gdb/xcoffread.c') 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"); -- cgit v1.1