Initialize input statement created in add_archive_member
authorThomas Preud'homme <thomas.preudhomme@arm.com>
Mon, 31 Oct 2016 09:44:18 +0000 (09:44 +0000)
committerThomas Preud'homme <thomas.preudhomme@arm.com>
Mon, 31 Oct 2016 09:44:18 +0000 (09:44 +0000)
2016-10-31  Thomas Preud'homme  <thomas.preudhomme@arm.com>

ld/
* ldmain.c (add_archive_element): Initialize input->header.type.
* plugin.c (plugin_maybe_claim): Assert the statement is an input
statement.

ld/ChangeLog
ld/ldmain.c
ld/plugin.c

index c7a20f1ed3229c0ee8a0ede3164121e2646c28a3..dacdf8ee0289984cb6ce93400675625e2cd74d74 100644 (file)
@@ -1,3 +1,9 @@
+2016-10-31  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+       * ldmain.c (add_archive_element): Initialize input->header.type.
+       * plugin.c (plugin_maybe_claim): Assert the statement is an input
+       statement.
+
 2016-10-15  Alan Modra  <amodra@gmail.com>
 
        * emultempl/spu_ovl.o_c: Regenerate.
index 29ef77f4f02f43e4c167c2e4794d1e60d81394d2..2f15ba72a9c6aeddf40761c3ff6d5a4b13428bf5 100644 (file)
@@ -800,6 +800,7 @@ add_archive_element (struct bfd_link_info *info,
 
   input = (lang_input_statement_type *)
       xcalloc (1, sizeof (lang_input_statement_type));
+  input->header.type = lang_input_statement_enum;
   input->filename = abfd->filename;
   input->local_sym_name = abfd->filename;
   input->the_bfd = abfd;
index 80d22e222d097cbc8004759bf71ac7fa678f5461..804294049af6daa4b9449c8abbd4d25277c07e6c 100644 (file)
@@ -1195,6 +1195,7 @@ plugin_object_p (bfd *ibfd)
 void
 plugin_maybe_claim (lang_input_statement_type *entry)
 {
+  ASSERT (entry->header.type == lang_input_statement_enum);
   if (plugin_object_p (entry->the_bfd))
     {
       bfd *abfd = entry->the_bfd->plugin_dummy_bfd;
This page took 0.04267 seconds and 4 git commands to generate.