aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>1997-09-18 22:02:06 +0000
committerNick Clifton <nickc@redhat.com>1997-09-18 22:02:06 +0000
commit55e6f0bf327ea57ae19cd193cda3537712905651 (patch)
tree00e8d2f3c162e28ad10b6998a229f7ee0e7fc029 /bfd
parentaf6f39b4c4eee27579833f65d2658342f8c439d8 (diff)
downloadgdb-55e6f0bf327ea57ae19cd193cda3537712905651.zip
gdb-55e6f0bf327ea57ae19cd193cda3537712905651.tar.gz
gdb-55e6f0bf327ea57ae19cd193cda3537712905651.tar.bz2
Improved error message to include symbol's name.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/elf32-v850.c20
2 files changed, 15 insertions, 9 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index f9934ae..dd5a460 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+Thu Sep 18 15:04:57 1997 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-v850.c (v850_elf_check_relocs): Improve error message.
+
Wed Sep 17 09:54:51 1997 Nick Clifton <nickc@cygnus.com>
start-sanitize-v850e
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index 532c237..13aed90 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -586,29 +586,31 @@ v850_elf_check_relocs (abfd, info, sec, relocs)
if ((h->other & V850_OTHER_MASK) != (other & V850_OTHER_MASK)
&& (h->other & V850_OTHER_ERROR) == 0)
{
- const char *msg;
-
+ const char * msg;
+ static char buff[100]; /* XXX */
+
switch (h->other & V850_OTHER_MASK)
{
default:
- msg = "Variable cannot occupy in multiple small data regions";
+ msg = "cannot occupy in multiple small data regions";
break;
case V850_OTHER_SDA | V850_OTHER_ZDA | V850_OTHER_TDA:
- msg = "Variable can only be in one of the small, zero, and tiny data regions";
+ msg = "can only be in one of the small, zero, and tiny data regions";
break;
case V850_OTHER_SDA | V850_OTHER_ZDA:
- msg = "Variable cannot be in both small and zero data regions simultaneously";
+ msg = "cannot be in both small and zero data regions simultaneously";
break;
case V850_OTHER_SDA | V850_OTHER_TDA:
- msg = "Variable cannot be in both small and tiny data regions simultaneously";
+ msg = "cannot be in both small and tiny data regions simultaneously";
break;
case V850_OTHER_ZDA | V850_OTHER_TDA:
- msg = "Variable cannot be in both zero and tiny data regions simultaneously";
+ msg = "cannot be in both zero and tiny data regions simultaneously";
break;
}
- (*info->callbacks->warning) (info, msg, h->root.root.string,
- abfd, h->root.u.def.section, 0);
+ sprintf (buff, "Variable '%s' %s", h->root.root.string, msg );
+ info->callbacks->warning (info, buff, h->root.root.string,
+ abfd, h->root.u.def.section, 0);
bfd_set_error (bfd_error_bad_value);
h->other |= V850_OTHER_ERROR;