[PATCH, binutils/ld] Initialize input statement created in add_archive_member
Thomas Preudhomme
thomas.preudhomme@foss.arm.com
Mon Oct 24 07:44:00 GMT 2016
add_archive_member creates an input statement structure but fails to initialize
the type of the structure accordingly. I noticed this while trying to browse all
input statement structures in the statement, file and input file list in ld as
some structures were skipped due to the wrong type.
This patch adds the necessary initialization and adds an assert in
plugin_object_p which assumes input statement and was receiving one of the badly
initialized structures.
ChangeLog entry is as follows:
*** ld/ChangeLog ***
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.
Testsuite shows no regression on arm-none-eabi and armeb-none-eabi.
Is this ok for master branch?
Best regards,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: init_input_statement_type.patch
Type: text/x-patch
Size: 943 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20161024/4f8968f0/attachment.bin>
More information about the Binutils
mailing list