This is the mail archive of the
mailing list for the binutils project.
Re: Bad patch for gas
- To: amodra at one dot net dot au
- Subject: Re: Bad patch for gas
- From: "H . J . Lu" <hjl at lucon dot org>
- Date: Wed, 23 May 2001 15:25:28 -0700
- Cc: binutils at sourceware dot cygnus dot com
- References: <20010523150144.A2431@lucon.org>
On Wed, May 23, 2001 at 03:01:44PM -0700, H . J . Lu wrote:
> I am having problems with this
> 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
xxx = resolve_symbol_value (frag->fr_symbol, 0);
Your changes won't work in those cases.