From 1da00eb45da1abe86cd36b4f3963fac329afa729 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 13 Nov 2000 01:12:31 +0000 Subject: 2000-11-12 H.J. Lu (hjl@gnu.org) * config/obj-elf.c (obj_elf_symver): Check missing version name. --- gas/config/obj-elf.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gas/config') 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, -- cgit v1.1