aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2000-11-13 01:12:31 +0000
committerH.J. Lu <hjl.tools@gmail.com>2000-11-13 01:12:31 +0000
commit1da00eb45da1abe86cd36b4f3963fac329afa729 (patch)
tree4b612f6f9f18a3b7fb8d5025bb0c78af7fcd76b3 /gas
parentf585997b37121851a8c208425f18e47a66cff888 (diff)
downloadgdb-1da00eb45da1abe86cd36b4f3963fac329afa729.zip
gdb-1da00eb45da1abe86cd36b4f3963fac329afa729.tar.gz
gdb-1da00eb45da1abe86cd36b4f3963fac329afa729.tar.bz2
2000-11-12 H.J. Lu (hjl@gnu.org)
* config/obj-elf.c (obj_elf_symver): Check missing version name.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/obj-elf.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index e662522..8bd4fa5 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,10 @@
2000-11-12 H.J. Lu (hjl@gnu.org)
+ * config/obj-elf.c (obj_elf_symver): Check missing version
+ name.
+
+2000-11-12 H.J. Lu (hjl@gnu.org)
+
* dwarf2dbg.c (dwarf2_generate_asm_lineno): Use addressT
instead of bfd_vma for non-bfd assemblers.
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c
index bad6259..4698e82 100644
--- a/gas/config/obj-elf.c
+++ b/gas/config/obj-elf.c
@@ -1127,12 +1127,16 @@ obj_elf_symver (ignore)
if (symbol_get_obj (sym)->versioned_name == NULL)
{
+ char *p, *rp;
+
symbol_get_obj (sym)->versioned_name = xstrdup (name);
*input_line_pointer = c;
- if (strchr (symbol_get_obj (sym)->versioned_name,
- ELF_VER_CHR) == NULL)
+ p = strchr (symbol_get_obj (sym)->versioned_name, ELF_VER_CHR);
+ if (p)
+ rp = strrchr (p, ELF_VER_CHR);
+ if (!p || p [1] == '\0' || rp [1] == '\0')
{
as_bad (_("missing version name in `%s' for symbol `%s'"),
symbol_get_obj (sym)->versioned_name,