diff options
author | Alan Modra <amodra@gmail.com> | 2001-03-17 03:02:06 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2001-03-17 03:02:06 +0000 |
commit | 2289f85d2410fb736111f0c4adf99eba874f38be (patch) | |
tree | 8478ce1c94e5faf12a6573fb302b9f6b8102f775 /gas/read.c | |
parent | 4a5c6a1dd9976729e9ce77819fa7cf8482de5f79 (diff) | |
download | gdb-2289f85d2410fb736111f0c4adf99eba874f38be.zip gdb-2289f85d2410fb736111f0c4adf99eba874f38be.tar.gz gdb-2289f85d2410fb736111f0c4adf99eba874f38be.tar.bz2 |
Teach .org to handle complex expressions
Diffstat (limited to 'gas/read.c')
-rw-r--r-- | gas/read.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -2379,9 +2379,17 @@ do_org (segment, exp, fill) else { char *p; + symbolS *sym = exp->X_add_symbol; + offsetT off = exp->X_add_number * OCTETS_PER_BYTE; - p = frag_var (rs_org, 1, 1, (relax_substateT) 0, exp->X_add_symbol, - exp->X_add_number * OCTETS_PER_BYTE, (char *) NULL); + if (exp->X_op != O_constant && exp->X_op != O_symbol) + { + /* Handle complex expressions. */ + sym = make_expr_symbol (exp); + off = 0; + } + + p = frag_var (rs_org, 1, 1, (relax_substateT) 0, sym, off, (char *) 0); *p = fill; } } |