This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/4] ld: Fix issue where PROVIDE overrides defined symbol


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]