diff options
author | Alan Modra <amodra@gmail.com> | 2003-01-11 06:24:12 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2003-01-11 06:24:12 +0000 |
commit | a0ea3e1db8c4ecb6ed33c135384d35d31a333918 (patch) | |
tree | 7132902ced6c6a4f714716e7c5ab8779e7a8f95a /gas/read.c | |
parent | 1fb309eaa6afba828c4b780e41dd744585fa09b2 (diff) | |
download | gdb-a0ea3e1db8c4ecb6ed33c135384d35d31a333918.zip gdb-a0ea3e1db8c4ecb6ed33c135384d35d31a333918.tar.gz gdb-a0ea3e1db8c4ecb6ed33c135384d35d31a333918.tar.bz2 |
* read.c (get_absolute_expr): New, split out from..
(get_absolute_expression): ..here.
* read.h (get_absolute_expr): Declare.
* config/obj-elf.c (elf_common): Use offsetT for "temp" and "size".
Trim size to arch bits_per_address, and test for negative input
via get_absolute_expr.
Diffstat (limited to 'gas/read.c')
-rw-r--r-- | gas/read.c | 25 |
1 files changed, 16 insertions, 9 deletions
@@ -1,6 +1,6 @@ /* read.c - read a source file - Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, - 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -4802,18 +4802,25 @@ get_known_segmented_expression (expP) } offsetT -get_absolute_expression () +get_absolute_expr (exp) + expressionS *exp; { - expressionS exp; - - expression (&exp); - if (exp.X_op != O_constant) + expression (exp); + if (exp->X_op != O_constant) { - if (exp.X_op != O_absent) + if (exp->X_op != O_absent) as_bad (_("bad or irreducible absolute expression")); - exp.X_add_number = 0; + exp->X_add_number = 0; } - return exp.X_add_number; + return exp->X_add_number; +} + +offsetT +get_absolute_expression () +{ + expressionS exp; + + return get_absolute_expr (&exp); } char /* Return terminator. */ |