aboutsummaryrefslogtreecommitdiff
path: root/gas/symbols.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2022-10-11 11:52:38 +0100
committerNick Clifton <nickc@redhat.com>2022-10-11 11:52:38 +0100
commit029b1ee8d8805ba8cbc4481c107c8e5f32b48eab (patch)
tree757818638082d7bc972bcecc1b3a42519d0c70d2 /gas/symbols.c
parentd2d69057a2c2d2e51d4b5ea27fea2e1e65a83592 (diff)
downloadgdb-029b1ee8d8805ba8cbc4481c107c8e5f32b48eab.zip
gdb-029b1ee8d8805ba8cbc4481c107c8e5f32b48eab.tar.gz
gdb-029b1ee8d8805ba8cbc4481c107c8e5f32b48eab.tar.bz2
Error: attempt to get value of unresolved symbol `L0'
* symbols.c (S_GET_VALUE): If the unresolved symbol is the fake label provide a more helpful error message to the user.
Diffstat (limited to 'gas/symbols.c')
-rw-r--r--gas/symbols.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gas/symbols.c b/gas/symbols.c
index d4c0dff..0aac3a43 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -2236,8 +2236,13 @@ S_GET_VALUE (symbolS *s)
if (! s->flags.resolved
|| s->x->value.X_op != O_symbol
|| (S_IS_DEFINED (s) && ! S_IS_COMMON (s)))
- as_bad (_("attempt to get value of unresolved symbol `%s'"),
- S_GET_NAME (s));
+ {
+ if (strcmp (S_GET_NAME (s), FAKE_LABEL_NAME) == 0)
+ as_bad (_("expression is too complex to be resolved"));
+ else
+ as_bad (_("attempt to get value of unresolved symbol `%s'"),
+ S_GET_NAME (s));
+ }
}
return (valueT) s->x->value.X_add_number;
}