aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-04-26 13:43:10 +0000
committerAlan Modra <amodra@gmail.com>2002-04-26 13:43:10 +0000
commite54fdaa5c98411e1874ba00e0b2d08815148ac06 (patch)
tree6985259052abd682500b97e273f396480d669568 /bfd
parenta50c18456ead8f239ca5af06ad7e418f6659ddce (diff)
downloadgdb-e54fdaa5c98411e1874ba00e0b2d08815148ac06.zip
gdb-e54fdaa5c98411e1874ba00e0b2d08815148ac06.tar.gz
gdb-e54fdaa5c98411e1874ba00e0b2d08815148ac06.tar.bz2
* opncls.c (bfd_make_readable): Call bfd_section_list_clear.
* xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog3
-rw-r--r--bfd/opncls.c4
-rw-r--r--bfd/xcofflink.c2
3 files changed, 6 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 5bbce0e..49a9d29 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,8 @@
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.
diff --git a/bfd/opncls.c b/bfd/opncls.c
index 49482f0..65a2a42 100644
--- a/bfd/opncls.c
+++ b/bfd/opncls.c
@@ -614,7 +614,6 @@ bfd_make_readable(abfd)
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;
@@ -633,7 +632,8 @@ bfd_make_readable(abfd)
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;
}
diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c
index 79952d2..0769826 100644
--- a/bfd/xcofflink.c
+++ b/bfd/xcofflink.c
@@ -2121,7 +2121,7 @@ xcoff_link_add_dynamic_symbols (abfd, info)
/* 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);