aboutsummaryrefslogtreecommitdiff
path: root/gold/symtab.h
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@gmail.com>2018-04-23 09:27:35 -0700
committerCary Coutant <ccoutant@gmail.com>2018-04-24 13:51:24 -0700
commit890d155592e66dc01fc4a9affba806c4e9fc36ba (patch)
tree0ccfa6f963c937ec8f5648ecb9d401ae676c0778 /gold/symtab.h
parentf67c0c9171508672167b6868c67211571421a1c6 (diff)
downloadgdb-890d155592e66dc01fc4a9affba806c4e9fc36ba.zip
gdb-890d155592e66dc01fc4a9affba806c4e9fc36ba.tar.gz
gdb-890d155592e66dc01fc4a9affba806c4e9fc36ba.tar.bz2
Fix internal error caused by conflicting default version definitions.
gold/ PR gold/16504 * dynobj.cc (Versions::symbol_section_contents): Don't set VERSYM_HIDDEN flag for undefined symbols. * symtab.cc (Symbol_table::add_from_object): Don't override default version definition with a different default version. * symtab.h (Symbol::from_dyn): New method. * testsuite/plugin_test.c (struct sym_info): Add ver field. (claim_file_hook): Pass symbol version to plugin API. (parse_readelf_line): Parse symbol version. * testsuite/Makefile.am (ver_test_pr16504): New test case. * testsuite/Makefile.in: Regenerate. * testsuite/ver_test_pr16504.sh: New test script. * testsuite/ver_test_pr16504_a.c: New source file. * testsuite/ver_test_pr16504_a.script: New version script. * testsuite/ver_test_pr16504_b.c: New source file. * testsuite/ver_test_pr16504_b.script: New version script.
Diffstat (limited to 'gold/symtab.h')
-rw-r--r--gold/symtab.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gold/symtab.h b/gold/symtab.h
index fdb7511..089e156 100644
--- a/gold/symtab.h
+++ b/gold/symtab.h
@@ -344,6 +344,11 @@ class Symbol
set_in_dyn()
{ this->in_dyn_ = true; }
+ // Return whether this symbol is defined in a dynamic object.
+ bool
+ from_dyn() const
+ { return this->source_ == FROM_OBJECT && this->object()->is_dynamic(); }
+
// Return whether this symbol has been seen in a real ELF object.
// (IN_REG will return TRUE if the symbol has been seen in either
// a real ELF object or an object claimed by a plugin.)