if (0 == bfd_section_size (abfd, asect))
return;
section.offset = 0;
+ section.objfile = objfile;
section.sec_ptr = asect;
section.addr = bfd_section_vma (abfd, asect);
section.endaddr = section.addr + bfd_section_size (abfd, asect);
objfile->sections_end = 0;
bfd_map_over_sections (objfile->obfd, add_to_objfile_sections, (char *)objfile);
- objfile->sections = obstack_finish (&objfile->psymbol_obstack);
+ objfile->sections = (struct obj_section *)
+ obstack_finish (&objfile->psymbol_obstack);
objfile->sections_end = objfile->sections + (int) objfile->sections_end;
return(0);
}
/* Returns a section whose range includes PC or NULL if none found. */
-sec_ptr
+struct obj_section *
find_pc_section(pc)
CORE_ADDR pc;
{
for (s = objfile->sections; s < objfile->sections_end; ++s)
if (s->addr <= pc
&& pc < s->endaddr)
- return(s->sec_ptr);
+ return(s);
return(NULL);
}