protected void read_sections()
{
if (has_sections)
return;
ArrayList list = new ArrayList ();
IntPtr asection = bfd_glue_get_first_section (bfd);
while (asection != IntPtr.Zero) {
Section section = new Section (this, asection);
list.Add (section);
asection = bfd_glue_get_next_section (asection);
}
sections = new Section [list.Count];
list.CopyTo (sections, 0);
has_sections = true;
}