From 715c6909e29a233406d54739976bb8674fa6b836 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 15 Apr 2013 17:31:17 +0000 Subject: [PATCH] * elfread.c (elf_symtab_read): Install versioned symbol under unversioned name as well. --- gdb/ChangeLog | 5 +++++ gdb/elfread.c | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4e0ac4bbf9e..d96ab8b588d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-04-15 Tom Tromey + + * elfread.c (elf_symtab_read): Install versioned symbol under + unversioned name as well. + 2013-04-15 Tom Tromey PR c++/11990: diff --git a/gdb/elfread.c b/gdb/elfread.c index 710e9e5d460..0ec1786f93a 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c @@ -574,6 +574,21 @@ elf_symtab_read (struct objfile *objfile, int type, gdbarch_elf_make_msymbol_special (gdbarch, sym, msym); } + /* If we see a default versioned symbol, install it under + its version-less name. */ + if (msym != NULL) + { + const char *atsign = strchr (sym->name, '@'); + + if (atsign != NULL && atsign[1] == '@' && atsign > sym->name) + { + int len = atsign - sym->name; + + record_minimal_symbol (sym->name, len, 1, symaddr, + ms_type, sym->section, objfile); + } + } + /* For @plt symbols, also record a trampoline to the destination symbol. The @plt symbol will be used in disassembly, and the trampoline will be used when we are -- 2.30.2