diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2000-11-13 01:12:31 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2000-11-13 01:12:31 +0000 |
commit | 1da00eb45da1abe86cd36b4f3963fac329afa729 (patch) | |
tree | 4b612f6f9f18a3b7fb8d5025bb0c78af7fcd76b3 /gas/config | |
parent | f585997b37121851a8c208425f18e47a66cff888 (diff) | |
download | gdb-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/config')
-rw-r--r-- | gas/config/obj-elf.c | 8 |
1 files changed, 6 insertions, 2 deletions
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, |