binutils-gdb/gas/testsuite
Alan Modra 1903f1385b resolve_symbol_value vs. .loc view resolution
In most cases we don't want expression symbols, such as that created
for an expression like "symbol + (1f - .)", resolved down to a
constant.  Instead we'd like to leave the expression as "symbol +
constant" once the "1f - ." part has been resolved, and let the
backend decide whether "symbol" can be reduced further.

However, that doesn't work when trying to resolve .loc view symbols
early.  We get expression symbols left as an O_symbol expression
pointing at an absolute symbol, and marked as sy_flags.sy_resolved.
That wouldn't really be a problem, but when one of those expression
symbols is used in further .loc view expressions, its value is taken
as zero.

This patch fixes the symbol value mistake, and stops creation of
O_symbol expression symbols pointing to absolute symbols.  Either of
these fixes would cure the .loc view usage.

	PR 24444
	* symbols.c (resolve_symbol_value): When handling symbols
	marked as sy_flags.resolved, return correct value for the
	case of expression symbols left as an O_symbol expression.
	Merge O_symbol code handling undefined and common symbols with
	code handling special cases of expression symbols.  Use
	seg_left to test for undefined and common symbols.  Don't
	leave an O_symbol expression when X_add_symbol resolves to
	the absolute_section.  Init final_val later.
	* testsuite/gas/mmix/basep-7.d: Adjust expected output.
2019-04-24 23:00:17 +09:30
..
config Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
gas resolve_symbol_value vs. .loc view resolution 2019-04-24 23:00:17 +09:30
lib Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
ChangeLog-2004 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2005 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2006 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2007 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2008 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2009 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2010 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2011 Add copyright notices 2012-12-10 12:48:03 +00:00
ChangeLog-2012 PR gas/14987 2013-01-02 13:38:57 +00:00
ChangeLog-2013 New Year - binutils ChangeLog rotation 2014-01-08 05:32:12 -08:00
ChangeLog-2014 ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ChangeLog-2015 binutils ChangeLog rotation 2016-01-01 22:59:17 +10:30
ChangeLog-9303 Add copyright notices 2012-12-10 12:48:03 +00:00