aboutsummaryrefslogtreecommitdiff
path: root/gas/read.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-05-25 00:01:30 +0000
committerAlan Modra <amodra@gmail.com>2001-05-25 00:01:30 +0000
commit40e3ba9bb7d85d35590a8828a42b3450e0dcb032 (patch)
tree46c0bb25ffc20aee7a783dbf0dd707e7c9710ed7 /gas/read.c
parent400071f14b469889399c792d701dc122d1f3d5cc (diff)
downloadgdb-40e3ba9bb7d85d35590a8828a42b3450e0dcb032.zip
gdb-40e3ba9bb7d85d35590a8828a42b3450e0dcb032.tar.gz
gdb-40e3ba9bb7d85d35590a8828a42b3450e0dcb032.tar.bz2
* expr.c (expr): Set return value to absolute_section for
subtractive operations on symbols within a segment. * read.c (pseudo_set): Set segment for complex expressions.
Diffstat (limited to 'gas/read.c')
-rw-r--r--gas/read.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gas/read.c b/gas/read.c
index 209ab6a..c14d2c0 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -3151,6 +3151,7 @@ pseudo_set (symbolP)
symbolS *symbolP;
{
expressionS exp;
+ segT seg;
#if (defined (OBJ_AOUT) || defined (OBJ_BOUT)) && ! defined (BFD_ASSEMBLER)
int ext;
#endif /* OBJ_AOUT or OBJ_BOUT */
@@ -3160,7 +3161,7 @@ pseudo_set (symbolP)
ext = S_IS_EXTERNAL (symbolP);
#endif /* OBJ_AOUT or OBJ_BOUT */
- (void) expression (&exp);
+ seg = expression (&exp);
if (exp.X_op == O_illegal)
as_bad (_("illegal expression; zero assumed"));
@@ -3236,9 +3237,9 @@ pseudo_set (symbolP)
break;
default:
- /* The value is some complex expression.
- FIXME: Should we set the segment to anything? */
+ /* The value is some complex expression. */
symbol_set_value_expression (symbolP, &exp);
+ S_SET_SEGMENT (symbolP, seg);
break;
}
}