Bug 288 - expression resolved too early
Summary: expression resolved too early
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.15
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-26 02:46 UTC by Alan Modra
Modified: 2005-10-20 11:31 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Modra 2004-07-26 02:46:36 UTC
See http://sources.redhat.com/ml/binutils/2004-07/msg00230.html

gas/expr.c around line 1278 says
	  /* If we have an absolute symbol or a reg, then we know its
	     value now.  */

This is *not* true.  A symbol equated to an expression may have an absolute
value, but not be resolvable immediately, such as when the expression involves
the subtraction of two symbols in the same segment but in different frags.

A simplified testcase is:

	.text
_start:
	.set x,0
	.long x
	.set x,.-_start
	.long x
	.balign 4
	.set x,.-_start
	.long x
Comment 1 Jan Beulich 2005-10-20 11:31:39 UTC
This should be fixed with http://sourceware.org/ml/binutils/2005-10/msg00112.html.