Message ID | 89d23099-259b-0843-25f6-7457758b7081@foss.arm.com |
---|---|
State | New |
Headers | show |
Hi Thomas, > 2016-10-21 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. Approved - please apply. Cheers Nick
Done, thanks. Best regards, Thomas On 31/10/16 09:09, Nick Clifton wrote: > Hi Thomas, > >> 2016-10-21 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. > > Approved - please apply. > > Cheers > Nick >
diff --git a/ld/ldmain.c b/ld/ldmain.c index 29ef77f4f02f43e4c167c2e4794d1e60d81394d2..2f15ba72a9c6aeddf40761c3ff6d5a4b13428bf5 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -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; diff --git a/ld/plugin.c b/ld/plugin.c index 80d22e222d097cbc8004759bf71ac7fa678f5461..804294049af6daa4b9449c8abbd4d25277c07e6c 100644 --- a/ld/plugin.c +++ b/ld/plugin.c @@ -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;