* xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
2002-04-26 Alan Modra <amodra@bigpond.net.au>
+ * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
+ * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
+
* elflink.h (elf_bfd_final_link): Ensure input bfd class is the
same as the output before calling elf_link_input_bfd.
abfd->arch_info = &bfd_default_arch_struct;
abfd->where = 0;
- abfd->sections = (asection *) NULL;
abfd->format = bfd_unknown;
abfd->my_archive = (bfd *) NULL;
abfd->origin = 0;
abfd->outsymbols = 0;
abfd->tdata.any = 0;
- bfd_check_format(abfd, bfd_object);
+ bfd_section_list_clear (abfd);
+ bfd_check_format (abfd, bfd_object);
return true;
}
/* Remove the sections from this object, so that they do not get
included in the link. */
- abfd->sections = NULL;
+ bfd_section_list_clear (abfd);
bfd_xcoff_swap_ldhdr_in (abfd, contents, &ldhdr);