[PATCH 3/4] ld: Fix issue where PROVIDE overrides defined symbol
Alan Modra
amodra@gmail.com
Wed Jan 10 06:50:00 GMT 2018
On Tue, Jan 09, 2018 at 09:08:58PM +0000, Andrew Burgess wrote:
> * ldexp.c (exp_fold_tree_1): Rework condition underwhich provide
> nodes are ignored in the tree walk, and move the location at which
> we change provide nodes into provided nodes.
> (exp_init_os): Add etree_provided.
> * testsuite/ld-scripts/provide-6.d: New file.
> * testsuite/ld-scripts/provide-6.t: New file.
> * testsuite/ld-scripts/provide-7.d: New file.
> * testsuite/ld-scripts/provide-7.t: New file.
> * testsuite/ld-scripts/provide-8.d: New file.
> * testsuite/ld-scripts/provide-8.t: New file.
OK, with a few nits fixed.
> + if ((expld.phase == lang_final_phase_enum
> + || expld.assign_name != NULL))
Excess parens here.
> + /* Copy the symbol type if this is an expression only
> + referencing a single symbol. (If the expression
> + contains ternary conditions, ignoring symbols on
> + false branches.) */
> + if (expld.result.valid_p
Testing valid_p here is redundant.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list