This is the mail archive of the binutils@sources.redhat.com 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: [RFA:] Fix DEFINED in ld scripts.


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


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