]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Error: attempt to get value of unresolved symbol `L0'
authorNick Clifton <nickc@redhat.com>
Tue, 11 Oct 2022 10:52:38 +0000 (11:52 +0100)
committerNick Clifton <nickc@redhat.com>
Tue, 11 Oct 2022 10:52:38 +0000 (11:52 +0100)
* symbols.c (S_GET_VALUE): If the unresolved symbol is the fake
label provide a more helpful error message to the user.

gas/ChangeLog
gas/symbols.c

index 018ce60e9ce09d33579b3f94d10c66d20e143da7..ce4e78cd92f7138a27c7efc36a4334815a99e499 100644 (file)
@@ -1,3 +1,8 @@
+2022-10-11  Nick Clifton  <nickc@redhat.com>
+
+       * symbols.c (S_GET_VALUE): If the unresolved symbol is the fake
+       label provide a more helpful error message to the user.
+
 2022-09-28  Nick Clifton  <nickc@redhat.com>
 
        PR 29623
index d4c0dff7ad67e60826d8d3f8377c0531ebc950a1..0aac3a434f22839939dfd9ea0b4c3776b8d9f0b8 100644 (file)
@@ -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;
 }