From 087d837e042af03a607f1974d32929a129eef806 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 8 Dec 2009 03:14:29 +0000 Subject: Call symbol_same_p to check to if 2 symbols are the same. gas/ 2009-12-07 H.J. Lu PR gas/11037 * expr.c (resolve_expression): Call symbol_same_p to check if 2 symbols are the same. * symbols.c (symbol_same_p): New. * symbols.h (symbol_same_p): Likewise. gas/testsuite/ 2009-12-07 H.J. Lu PR gas/11037 * gas/i386/intelpic.s: Add testcases. * gas/i386/intelpic.d: Updated. --- gas/expr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gas/expr.c') diff --git a/gas/expr.c b/gas/expr.c index 094141f..fbfdffc 100644 --- a/gas/expr.c +++ b/gas/expr.c @@ -2237,8 +2237,7 @@ resolve_expression (expressionS *expressionP) op = O_constant; else if (seg_left == reg_section && final_val == 0) op = O_register; - else if (seg_left == undefined_section - && add_symbol != orig_add_symbol) + else if (!symbol_same_p (add_symbol, orig_add_symbol)) final_val += left; expressionP->X_add_symbol = add_symbol; } -- cgit v1.1