[RFA:] Fix DEFINED in ld scripts.

Alan Modra amodra@bigpond.net.au
Fri Oct 10 12:52:00 GMT 2003


On Fri, Oct 10, 2003 at 04:12:39AM -0400, Hans-Peter Nilsson wrote:
> +   /* The value "3" is ad-hoc, somewhat related to the expected number of
> +      DEFINED expressions in a linker script.  For most default linker
> +      scripts, there are none.  */
> +   if (bfd_hash_table_init_n (&lang_definedness_table,
> + 			     lang_definedness_newfunc, 3) != TRUE)

So why bother with a hash table?  Wouldn't a simple list do?

> ! 	     Callers of exp_fold_tree need to increment
> ! 	     lang_statement_iteration before starting to iterate over the
> ! 	     statement list.  We need to do it before each call instead of
> ! 	     in lang_do_assignments because we can't tell the root call
> ! 	     from its recursions.  */

Split out the body of lang_do_assignments to lang_do_assignments_1.
Then you can twiddle your iteration count in lang_do_assignments.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list