Discussion:
[PATCH, ld] Document purpose of each ld statement lists
Thomas Preudhomme
2018-11-28 11:09:23 UTC
Permalink
Hi,

When discovering the statement lists via their header variable
statement_list, file_chain and input_file_chain it can be confusing to
figure out what they are for. They can point to the same initial
statement and the relation between the next field they use is not
obvious from the name.

This commit adds comment for each of those statement list header to
explain what they are for and what next field they use. It also rewrite
the comment for the next fields to simply redirect the reader to the
list header to avoid duplication of documentation.

ChangeLog entry is as follows:

*** ld/ChangeLog ***

2018-11-28 Thomas Preud'homme <***@linaro.org>

* ldlang.c (statement_list): Document purpose and what next field it
uses.
(file_chain): Likewise.
(input_file_chain): Likewise.
* ldlang.h (lang_statement_header_type): Document statement list header
the next pointer correspond to.
(lang_statement_header_type): Replace comment for next and
next_real_file field to refer the reader to their corresponding
statement list header.

Testing: Builds successfully.

Is this ok for master?

Best regards,

Thomas
Nick Clifton
2018-11-29 13:10:23 UTC
Permalink
Hi Thomas,
Post by Thomas Preudhomme
*** ld/ChangeLog ***
* ldlang.c (statement_list): Document purpose and what next field it
uses.
(file_chain): Likewise.
(input_file_chain): Likewise.
* ldlang.h (lang_statement_header_type): Document statement list header
the next pointer correspond to.
(lang_statement_header_type): Replace comment for next and
next_real_file field to refer the reader to their corresponding
statement list header.
Approved - please apply.

Cheers
Nick

Loading...