From: H.J. Lu Date: Mon, 13 Nov 2000 01:12:31 +0000 (+0000) Subject: 2000-11-12 H.J. Lu (hjl@gnu.org) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1da00eb45da1abe86cd36b4f3963fac329afa729;p=binutils-gdb.git 2000-11-12 H.J. Lu (hjl@gnu.org) * config/obj-elf.c (obj_elf_symver): Check missing version name. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index e662522f4c1..8bd4fa59c0b 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +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 diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index bad62594d3a..4698e82fb41 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,