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]

Re: Bad patch for gas


On Wed, May 23, 2001 at 03:01:44PM -0700, H . J . Lu wrote:
> I am having problems with this
> 
> http://sources.redhat.com/ml/binutils/2001-05/msg00349.html
> 
> Alan, your changes break the logic of finalize_syms:
> 
> -  /* Expressions aren't really symbols, so don't finalize their values
> -     until relaxation is complete.  */
> -  if (final_seg == expr_section && finalize != 2)
> -    finalize = 0;
> 
> -/* Used to control final evaluation of expressions that are more
> -   complex than symbol + constant.  1 means set final value for simple
> -   expressions, 2 means set final value for more complex expressions.  */
> -int finalize_syms = 1;
> +/* Used to control final evaluation of expressions.  */
> +int finalize_syms = 0;
> 
>    /* Relaxation has completed.  Freeze all syms.  */
> -  finalize_syms = 2;
> +  finalize_syms = 1;
> 
> resolve_symbol_value used to be able to temporarily change finalize.
> Now, finalize is almost always 0 in resolve_symbol_value. I will see
> if I can fix it without reverting the whole patch.
> 

I am afraid that patch has to be reverted. There are 2 problems:

1. finalize_syms used to be initialized to 1 and resolve_symbol_value
had many "if (finalize)". Initialize finalize_syms to 0 and change
"if (finalize)" to "if (finalize_syms)" don't look right to me.
2. There are at least 3 places where resolve_symbol_value was called
with

	xxx = resolve_symbol_value (frag->fr_symbol, 0);

Your changes won't work in those cases.


H.J.


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