aboutsummaryrefslogtreecommitdiff
path: root/gas/expr.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1993-07-19 18:46:39 +0000
committerIan Lance Taylor <ian@airs.com>1993-07-19 18:46:39 +0000
commitffffc8fb5c4c02cc43fb2e040e5f410d470c183c (patch)
tree4170e91d5bb54f1e3b8aad434ca27bed72255260 /gas/expr.c
parent28403b8ee766e730a13ad2a7f2b817d1671905fd (diff)
downloadgdb-ffffc8fb5c4c02cc43fb2e040e5f410d470c183c.zip
gdb-ffffc8fb5c4c02cc43fb2e040e5f410d470c183c.tar.gz
gdb-ffffc8fb5c4c02cc43fb2e040e5f410d470c183c.tar.bz2
* expr.c (clean_up_expression): Don't cancel the subtraction of
undefined symbols. Fixes PR 2997. * read.c (s_data), config/obj-coffbfd.c (obj_coff_data): If -R, switch to text section rather than data section. Fixes PR 2971.
Diffstat (limited to 'gas/expr.c')
-rw-r--r--gas/expr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gas/expr.c b/gas/expr.c
index a7e32df..aa1b66d 100644
--- a/gas/expr.c
+++ b/gas/expr.c
@@ -681,6 +681,7 @@ clean_up_expression (expressionP)
&& expressionP->X_add_symbol
&& (expressionP->X_subtract_symbol->sy_frag
== expressionP->X_add_symbol->sy_frag)
+ && SEG_NORMAL (S_GET_SEGMENT (expressionP->X_add_symbol))
&& (S_GET_VALUE (expressionP->X_subtract_symbol)
== S_GET_VALUE (expressionP->X_add_symbol))))
{