aboutsummaryrefslogtreecommitdiff
path: root/gdb/elfread.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-04-15 17:31:17 +0000
committerTom Tromey <tromey@redhat.com>2013-04-15 17:31:17 +0000
commit715c6909e29a233406d54739976bb8674fa6b836 (patch)
tree24bdc128f3b5ea7a07129325ab1ce85c194f1cec /gdb/elfread.c
parent8de20a37d6eb551a69a04b1b8e67874b9f14123d (diff)
downloadgdb-715c6909e29a233406d54739976bb8674fa6b836.zip
gdb-715c6909e29a233406d54739976bb8674fa6b836.tar.gz
gdb-715c6909e29a233406d54739976bb8674fa6b836.tar.bz2
* elfread.c (elf_symtab_read): Install versioned symbol under
unversioned name as well.
Diffstat (limited to 'gdb/elfread.c')
-rw-r--r--gdb/elfread.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 710e9e5..0ec1786 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